2021/06/01 - Amazon Simple Notification Service - 6 new api methods
Changes This release adds SMS sandbox in Amazon SNS and the ability to view all configured origination numbers. The SMS sandbox provides a safe environment for sending SMS messages, without risking your reputation as an SMS sender.
Retrieves the SMS sandbox status for the calling AWS account in the target AWS Region.
When you start using Amazon SNS to send SMS messages, your AWS account is in the SMS sandbox . The SMS sandbox provides a safe environment for you to try Amazon SNS features without risking your reputation as an SMS sender. While your account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send SMS messages only to verified destination phone numbers. For more information, including how to move out of the sandbox to send messages without restrictions, see SMS sandbox in the Amazon SNS Developer Guide .
See also: AWS API Documentation
Request Syntax
client.get_sms_sandbox_account_status()
dict
Response Syntax
{ 'IsInSandbox': True|False }
Response Structure
(dict) --
IsInSandbox (boolean) --
Indicates whether the calling account is in the SMS sandbox.
Lists the calling AWS account's dedicated origination numbers and their metadata. For more information about origination numbers, see Origination numbers in the Amazon SNS Developer Guide .
See also: AWS API Documentation
Request Syntax
client.list_origination_numbers( NextToken='string', MaxResults=123 )
string
Token that the previous ListOriginationNumbers request returns.
integer
The maximum number of origination numbers to return.
dict
Response Syntax
{ 'NextToken': 'string', 'PhoneNumbers': [ { 'CreatedAt': datetime(2015, 1, 1), 'PhoneNumber': 'string', 'Status': 'string', 'Iso2CountryCode': 'string', 'RouteType': 'Transactional'|'Promotional'|'Premium', 'NumberCapabilities': [ 'SMS'|'MMS'|'VOICE', ] }, ] }
Response Structure
(dict) --
NextToken (string) --
A NextToken string is returned when you call the ListOriginationNumbers operation if additional pages of records are available.
PhoneNumbers (list) --
A list of the calling account's verified and pending origination numbers.
(dict) --
A list of phone numbers and their metadata.
CreatedAt (datetime) --
The date and time when the phone number was created.
PhoneNumber (string) --
The phone number.
Status (string) --
The status of the phone number.
Iso2CountryCode (string) --
The two-character code for the country or region, in ISO 3166-1 alpha-2 format.
RouteType (string) --
The list of supported routes.
NumberCapabilities (list) --
The capabilities of each phone number.
(string) -- Enum listing out all supported number capabilities.
Deletes an AWS account's verified or pending phone number from the SMS sandbox.
When you start using Amazon SNS to send SMS messages, your AWS account is in the SMS sandbox . The SMS sandbox provides a safe environment for you to try Amazon SNS features without risking your reputation as an SMS sender. While your account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send SMS messages only to verified destination phone numbers. For more information, including how to move out of the sandbox to send messages without restrictions, see SMS sandbox in the Amazon SNS Developer Guide .
See also: AWS API Documentation
Request Syntax
client.delete_sms_sandbox_phone_number( PhoneNumber='string' )
string
[REQUIRED]
The destination phone number to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Verifies a destination phone number with a one-time password (OTP) for the calling AWS account.
When you start using Amazon SNS to send SMS messages, your AWS account is in the SMS sandbox . The SMS sandbox provides a safe environment for you to try Amazon SNS features without risking your reputation as an SMS sender. While your account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send SMS messages only to verified destination phone numbers. For more information, including how to move out of the sandbox to send messages without restrictions, see SMS sandbox in the Amazon SNS Developer Guide .
See also: AWS API Documentation
Request Syntax
client.verify_sms_sandbox_phone_number( PhoneNumber='string', OneTimePassword='string' )
string
[REQUIRED]
The destination phone number to verify.
string
[REQUIRED]
The OTP sent to the destination number from the CreateSMSSandBoxPhoneNumber call.
dict
Response Syntax
{}
Response Structure
(dict) --
The destination phone number's verification status.
Adds a destination phone number to an AWS account in the SMS sandbox and sends a one-time password (OTP) to that phone number.
When you start using Amazon SNS to send SMS messages, your AWS account is in the SMS sandbox . The SMS sandbox provides a safe environment for you to try Amazon SNS features without risking your reputation as an SMS sender. While your account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send SMS messages only to verified destination phone numbers. For more information, including how to move out of the sandbox to send messages without restrictions, see SMS sandbox in the Amazon SNS Developer Guide .
See also: AWS API Documentation
Request Syntax
client.create_sms_sandbox_phone_number( PhoneNumber='string', LanguageCode='en-US'|'en-GB'|'es-419'|'es-ES'|'de-DE'|'fr-CA'|'fr-FR'|'it-IT'|'ja-JP'|'pt-BR'|'kr-KR'|'zh-CN'|'zh-TW' )
string
[REQUIRED]
The destination phone number to verify. On verification, Amazon SNS adds this phone number to the list of verified phone numbers that you can send SMS messages to.
string
The language to use for sending the OTP. The default value is en-US .
dict
Response Syntax
{}
Response Structure
(dict) --
Lists the calling AWS account's current verified and pending destination phone numbers in the SMS sandbox.
When you start using Amazon SNS to send SMS messages, your AWS account is in the SMS sandbox . The SMS sandbox provides a safe environment for you to try Amazon SNS features without risking your reputation as an SMS sender. While your account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send SMS messages only to verified destination phone numbers. For more information, including how to move out of the sandbox to send messages without restrictions, see SMS sandbox in the Amazon SNS Developer Guide .
See also: AWS API Documentation
Request Syntax
client.list_sms_sandbox_phone_numbers( NextToken='string', MaxResults=123 )
string
Token that the previous ListSMSSandboxPhoneNumbersInput request returns.
integer
The maximum number of phone numbers to return.
dict
Response Syntax
{ 'PhoneNumbers': [ { 'PhoneNumber': 'string', 'Status': 'Pending'|'Verified' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
PhoneNumbers (list) --
A list of the calling account's pending and verified phone numbers.
(dict) --
A verified or pending destination phone number in the SMS sandbox.
When you start using Amazon SNS to send SMS messages, your AWS account is in the SMS sandbox . The SMS sandbox provides a safe environment for you to try Amazon SNS features without risking your reputation as an SMS sender. While your account is in the SMS sandbox, you can use all of the features of Amazon SNS. However, you can send SMS messages only to verified destination phone numbers. For more information, including how to move out of the sandbox to send messages without restrictions, see SMS sandbox in the Amazon SNS Developer Guide .
PhoneNumber (string) --
The destination phone number.
Status (string) --
The destination phone number's verification status.
NextToken (string) --
A NextToken string is returned when you call the ListSMSSandboxPhoneNumbersInput operation if additional pages of records are available.