2024/11/15 - Amazon Pinpoint SMS Voice V2 - 5 new8 updated api methods
Changes Use rule overrides to always allow or always block messages to specific phone numbers. Use message feedback to monitor if a customer interacts with your message.
Permanently delete the protect configuration rule set number override.
See also: AWS API Documentation
Request Syntax
client.delete_protect_configuration_rule_set_number_override( ProtectConfigurationId='string', DestinationPhoneNumber='string' )
string
[REQUIRED]
The unique identifier for the protect configuration.
string
[REQUIRED]
The destination phone number in E.164 format.
dict
Response Syntax
{ 'ProtectConfigurationArn': 'string', 'ProtectConfigurationId': 'string', 'DestinationPhoneNumber': 'string', 'CreatedTimestamp': datetime(2015, 1, 1), 'Action': 'ALLOW'|'BLOCK', 'IsoCountryCode': 'string', 'ExpirationTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) --
ProtectConfigurationArn (string) --
The Amazon Resource Name (ARN) of the protect configuration.
ProtectConfigurationId (string) --
The unique identifier for the protect configuration.
DestinationPhoneNumber (string) --
The destination phone number in E.164 format.
CreatedTimestamp (datetime) --
The time when the rule was created, in UNIX epoch time format.
Action (string) --
The action associated with the rule.
IsoCountryCode (string) --
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
ExpirationTimestamp (datetime) --
The time when the resource-based policy was created, in UNIX epoch time format.
Sets a configuration set's default for message feedback.
See also: AWS API Documentation
Request Syntax
client.set_default_message_feedback_enabled( ConfigurationSetName='string', MessageFeedbackEnabled=True|False )
string
[REQUIRED]
The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
boolean
[REQUIRED]
Set to true to enable message feedback.
dict
Response Syntax
{ 'ConfigurationSetArn': 'string', 'ConfigurationSetName': 'string', 'MessageFeedbackEnabled': True|False }
Response Structure
(dict) --
ConfigurationSetArn (string) --
The arn of the configuration set.
ConfigurationSetName (string) --
The name of the configuration.
MessageFeedbackEnabled (boolean) --
True if message feedback is enabled.
Create or update a RuleSetNumberOverride and associate it with a protect configuration.
See also: AWS API Documentation
Request Syntax
client.put_protect_configuration_rule_set_number_override( ClientToken='string', ProtectConfigurationId='string', DestinationPhoneNumber='string', Action='ALLOW'|'BLOCK', ExpirationTimestamp=datetime(2015, 1, 1) )
string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
This field is autopopulated if not provided.
string
[REQUIRED]
The unique identifier for the protect configuration.
string
[REQUIRED]
The destination phone number in E.164 format.
string
[REQUIRED]
The action for the rule to either block or allow messages to the destination phone number.
datetime
The time the rule will expire at. If ExpirationTimestamp is not set then the rule does not expire.
dict
Response Syntax
{ 'ProtectConfigurationArn': 'string', 'ProtectConfigurationId': 'string', 'DestinationPhoneNumber': 'string', 'CreatedTimestamp': datetime(2015, 1, 1), 'Action': 'ALLOW'|'BLOCK', 'IsoCountryCode': 'string', 'ExpirationTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) --
ProtectConfigurationArn (string) --
The Amazon Resource Name (ARN) of the protect configuration.
ProtectConfigurationId (string) --
The unique identifier for the protect configuration.
DestinationPhoneNumber (string) --
The destination phone number in E.164 format.
CreatedTimestamp (datetime) --
The time when the rule was created, in UNIX epoch time format.
Action (string) --
The action for the rule to take.
IsoCountryCode (string) --
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
ExpirationTimestamp (datetime) --
The time the rule will expire at.
Set the MessageFeedbackStatus as RECEIVED or FAILED for the passed in MessageId.
If you use message feedback then you must update message feedback record. When you receive a signal that a user has received the message you must use PutMessageFeedback to set the message feedback record as RECEIVED; Otherwise, an hour after the message feedback record is set to FAILED.
See also: AWS API Documentation
Request Syntax
client.put_message_feedback( MessageId='string', MessageFeedbackStatus='RECEIVED'|'FAILED' )
string
[REQUIRED]
The unique identifier for the message.
string
[REQUIRED]
Set the message feedback to be either RECEIVED or FAILED.
dict
Response Syntax
{ 'MessageId': 'string', 'MessageFeedbackStatus': 'RECEIVED'|'FAILED' }
Response Structure
(dict) --
MessageId (string) --
The unique identifier for the message.
MessageFeedbackStatus (string) --
The current status of the message.
Retrieve all of the protect configuration rule set number overrides that match the filters.
See also: AWS API Documentation
Request Syntax
client.list_protect_configuration_rule_set_number_overrides( ProtectConfigurationId='string', Filters=[ { 'Name': 'iso-country-code'|'destination-phone-number-begins-with'|'action'|'expires-before'|'expires-after'|'created-before'|'created-after', 'Values': [ 'string', ] }, ], NextToken='string', MaxResults=123 )
string
[REQUIRED]
The unique identifier for the protect configuration.
list
An array of ProtectConfigurationRuleSetNumberOverrideFilterItem objects to filter the results.
(dict) --
The information for a protect configuration rule set number override that meets a specified criteria.
Name (string) -- [REQUIRED]
The name of the attribute to filter on.
Values (list) -- [REQUIRED]
An array values to filter for.
(string) --
string
The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.
integer
The maximum number of results to return per each request.
dict
Response Syntax
{ 'ProtectConfigurationArn': 'string', 'ProtectConfigurationId': 'string', 'RuleSetNumberOverrides': [ { 'DestinationPhoneNumber': 'string', 'CreatedTimestamp': datetime(2015, 1, 1), 'Action': 'ALLOW'|'BLOCK', 'IsoCountryCode': 'string', 'ExpirationTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
ProtectConfigurationArn (string) --
The Amazon Resource Name (ARN) of the protect configuration.
ProtectConfigurationId (string) --
The unique identifier for the protect configuration.
RuleSetNumberOverrides (list) --
An array of RuleSetNumberOverrides objects.
(dict) --
Provides details on a RuleSetNumberOverride.
DestinationPhoneNumber (string) --
The destination phone number in E.164 format.
CreatedTimestamp (datetime) --
The time when the rule was created, in UNIX epoch time format.
Action (string) --
The action for the rule to perform of either blocking or allowing messages to the destination phone number.
IsoCountryCode (string) --
The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
ExpirationTimestamp (datetime) --
The time the rule will expire at. If ExpirationTimestamp is not set then the rule will not expire.
NextToken (string) --
The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.
{'MatchingEventTypes': {'TEXT_PROTECT_BLOCKED'}}Response
{'EventDestination': {'MatchingEventTypes': {'TEXT_PROTECT_BLOCKED'}}}
Creates a new event destination in a configuration set.
An event destination is a location where you send message events. The event options are Amazon CloudWatch, Amazon Data Firehose, or Amazon SNS. For example, when a message is delivered successfully, you can send information about that event to an event destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.
Each configuration set can contain between 0 and 5 event destinations. Each event destination can contain a reference to a single destination, such as a CloudWatch or Firehose destination.
See also: AWS API Documentation
Request Syntax
client.create_event_destination( ConfigurationSetName='string', EventDestinationName='string', MatchingEventTypes=[ 'ALL'|'TEXT_ALL'|'TEXT_SENT'|'TEXT_PENDING'|'TEXT_QUEUED'|'TEXT_SUCCESSFUL'|'TEXT_DELIVERED'|'TEXT_INVALID'|'TEXT_INVALID_MESSAGE'|'TEXT_UNREACHABLE'|'TEXT_CARRIER_UNREACHABLE'|'TEXT_BLOCKED'|'TEXT_CARRIER_BLOCKED'|'TEXT_SPAM'|'TEXT_UNKNOWN'|'TEXT_TTL_EXPIRED'|'TEXT_PROTECT_BLOCKED'|'VOICE_ALL'|'VOICE_INITIATED'|'VOICE_RINGING'|'VOICE_ANSWERED'|'VOICE_COMPLETED'|'VOICE_BUSY'|'VOICE_NO_ANSWER'|'VOICE_FAILED'|'VOICE_TTL_EXPIRED'|'MEDIA_ALL'|'MEDIA_PENDING'|'MEDIA_QUEUED'|'MEDIA_SUCCESSFUL'|'MEDIA_DELIVERED'|'MEDIA_INVALID'|'MEDIA_INVALID_MESSAGE'|'MEDIA_UNREACHABLE'|'MEDIA_CARRIER_UNREACHABLE'|'MEDIA_BLOCKED'|'MEDIA_CARRIER_BLOCKED'|'MEDIA_SPAM'|'MEDIA_UNKNOWN'|'MEDIA_TTL_EXPIRED'|'MEDIA_FILE_INACCESSIBLE'|'MEDIA_FILE_TYPE_UNSUPPORTED'|'MEDIA_FILE_SIZE_EXCEEDED', ], CloudWatchLogsDestination={ 'IamRoleArn': 'string', 'LogGroupArn': 'string' }, KinesisFirehoseDestination={ 'IamRoleArn': 'string', 'DeliveryStreamArn': 'string' }, SnsDestination={ 'TopicArn': 'string' }, ClientToken='string' )
string
[REQUIRED]
Either the name of the configuration set or the configuration set ARN to apply event logging to. The ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.
string
[REQUIRED]
The name that identifies the event destination.
list
[REQUIRED]
An array of event types that determine which events to log. If "ALL" is used, then AWS End User Messaging SMS and Voice logs every event type.
(string) --
dict
An object that contains information about an event destination for logging to Amazon CloudWatch Logs.
IamRoleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to write event data to an Amazon CloudWatch destination.
LogGroupArn (string) -- [REQUIRED]
The name of the Amazon CloudWatch log group that you want to record events in.
dict
An object that contains information about an event destination for logging to Amazon Data Firehose.
IamRoleArn (string) -- [REQUIRED]
The ARN of an Identity and Access Management role that is able to write event data to an Amazon Data Firehose destination.
DeliveryStreamArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the delivery stream.
dict
An object that contains information about an event destination for logging to Amazon SNS.
TopicArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.
string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify a client token, a randomly generated token is used for the request to ensure idempotency.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'ConfigurationSetArn': 'string', 'ConfigurationSetName': 'string', 'EventDestination': { 'EventDestinationName': 'string', 'Enabled': True|False, 'MatchingEventTypes': [ 'ALL'|'TEXT_ALL'|'TEXT_SENT'|'TEXT_PENDING'|'TEXT_QUEUED'|'TEXT_SUCCESSFUL'|'TEXT_DELIVERED'|'TEXT_INVALID'|'TEXT_INVALID_MESSAGE'|'TEXT_UNREACHABLE'|'TEXT_CARRIER_UNREACHABLE'|'TEXT_BLOCKED'|'TEXT_CARRIER_BLOCKED'|'TEXT_SPAM'|'TEXT_UNKNOWN'|'TEXT_TTL_EXPIRED'|'TEXT_PROTECT_BLOCKED'|'VOICE_ALL'|'VOICE_INITIATED'|'VOICE_RINGING'|'VOICE_ANSWERED'|'VOICE_COMPLETED'|'VOICE_BUSY'|'VOICE_NO_ANSWER'|'VOICE_FAILED'|'VOICE_TTL_EXPIRED'|'MEDIA_ALL'|'MEDIA_PENDING'|'MEDIA_QUEUED'|'MEDIA_SUCCESSFUL'|'MEDIA_DELIVERED'|'MEDIA_INVALID'|'MEDIA_INVALID_MESSAGE'|'MEDIA_UNREACHABLE'|'MEDIA_CARRIER_UNREACHABLE'|'MEDIA_BLOCKED'|'MEDIA_CARRIER_BLOCKED'|'MEDIA_SPAM'|'MEDIA_UNKNOWN'|'MEDIA_TTL_EXPIRED'|'MEDIA_FILE_INACCESSIBLE'|'MEDIA_FILE_TYPE_UNSUPPORTED'|'MEDIA_FILE_SIZE_EXCEEDED', ], 'CloudWatchLogsDestination': { 'IamRoleArn': 'string', 'LogGroupArn': 'string' }, 'KinesisFirehoseDestination': { 'IamRoleArn': 'string', 'DeliveryStreamArn': 'string' }, 'SnsDestination': { 'TopicArn': 'string' } } }
Response Structure
(dict) --
ConfigurationSetArn (string) --
The ARN of the configuration set.
ConfigurationSetName (string) --
The name of the configuration set.
EventDestination (dict) --
The details of the destination where events are logged.
EventDestinationName (string) --
The name of the EventDestination.
Enabled (boolean) --
When set to true events will be logged.
MatchingEventTypes (list) --
An array of event types that determine which events to log.
(string) --
CloudWatchLogsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon CloudWatch logs.
IamRoleArn (string) --
The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to write event data to an Amazon CloudWatch destination.
LogGroupArn (string) --
The name of the Amazon CloudWatch log group that you want to record events in.
KinesisFirehoseDestination (dict) --
An object that contains information about an event destination for logging to Amazon Data Firehose.
IamRoleArn (string) --
The ARN of an Identity and Access Management role that is able to write event data to an Amazon Data Firehose destination.
DeliveryStreamArn (string) --
The Amazon Resource Name (ARN) of the delivery stream.
SnsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon SNS.
TopicArn (string) --
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.
{'DefaultMessageFeedbackEnabled': 'boolean', 'EventDestinations': {'MatchingEventTypes': {'TEXT_PROTECT_BLOCKED'}}}
Deletes an existing configuration set.
A configuration set is a set of rules that you apply to voice and SMS messages that you send. In a configuration set, you can specify a destination for specific types of events related to voice and SMS messages.
See also: AWS API Documentation
Request Syntax
client.delete_configuration_set( ConfigurationSetName='string' )
string
[REQUIRED]
The name of the configuration set or the configuration set ARN that you want to delete. The ConfigurationSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.
dict
Response Syntax
{ 'ConfigurationSetArn': 'string', 'ConfigurationSetName': 'string', 'EventDestinations': [ { 'EventDestinationName': 'string', 'Enabled': True|False, 'MatchingEventTypes': [ 'ALL'|'TEXT_ALL'|'TEXT_SENT'|'TEXT_PENDING'|'TEXT_QUEUED'|'TEXT_SUCCESSFUL'|'TEXT_DELIVERED'|'TEXT_INVALID'|'TEXT_INVALID_MESSAGE'|'TEXT_UNREACHABLE'|'TEXT_CARRIER_UNREACHABLE'|'TEXT_BLOCKED'|'TEXT_CARRIER_BLOCKED'|'TEXT_SPAM'|'TEXT_UNKNOWN'|'TEXT_TTL_EXPIRED'|'TEXT_PROTECT_BLOCKED'|'VOICE_ALL'|'VOICE_INITIATED'|'VOICE_RINGING'|'VOICE_ANSWERED'|'VOICE_COMPLETED'|'VOICE_BUSY'|'VOICE_NO_ANSWER'|'VOICE_FAILED'|'VOICE_TTL_EXPIRED'|'MEDIA_ALL'|'MEDIA_PENDING'|'MEDIA_QUEUED'|'MEDIA_SUCCESSFUL'|'MEDIA_DELIVERED'|'MEDIA_INVALID'|'MEDIA_INVALID_MESSAGE'|'MEDIA_UNREACHABLE'|'MEDIA_CARRIER_UNREACHABLE'|'MEDIA_BLOCKED'|'MEDIA_CARRIER_BLOCKED'|'MEDIA_SPAM'|'MEDIA_UNKNOWN'|'MEDIA_TTL_EXPIRED'|'MEDIA_FILE_INACCESSIBLE'|'MEDIA_FILE_TYPE_UNSUPPORTED'|'MEDIA_FILE_SIZE_EXCEEDED', ], 'CloudWatchLogsDestination': { 'IamRoleArn': 'string', 'LogGroupArn': 'string' }, 'KinesisFirehoseDestination': { 'IamRoleArn': 'string', 'DeliveryStreamArn': 'string' }, 'SnsDestination': { 'TopicArn': 'string' } }, ], 'DefaultMessageType': 'TRANSACTIONAL'|'PROMOTIONAL', 'DefaultSenderId': 'string', 'DefaultMessageFeedbackEnabled': True|False, 'CreatedTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) --
ConfigurationSetArn (string) --
The Amazon Resource Name (ARN) of the deleted configuration set.
ConfigurationSetName (string) --
The name of the deleted configuration set.
EventDestinations (list) --
An array of any EventDestination objects that were associated with the deleted configuration set.
(dict) --
Contains information about an event destination.
Event destinations are associated with configuration sets, which enable you to publish message sending events to CloudWatch, Firehose, or Amazon SNS.
EventDestinationName (string) --
The name of the EventDestination.
Enabled (boolean) --
When set to true events will be logged.
MatchingEventTypes (list) --
An array of event types that determine which events to log.
(string) --
CloudWatchLogsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon CloudWatch logs.
IamRoleArn (string) --
The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to write event data to an Amazon CloudWatch destination.
LogGroupArn (string) --
The name of the Amazon CloudWatch log group that you want to record events in.
KinesisFirehoseDestination (dict) --
An object that contains information about an event destination for logging to Amazon Data Firehose.
IamRoleArn (string) --
The ARN of an Identity and Access Management role that is able to write event data to an Amazon Data Firehose destination.
DeliveryStreamArn (string) --
The Amazon Resource Name (ARN) of the delivery stream.
SnsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon SNS.
TopicArn (string) --
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.
DefaultMessageType (string) --
The default message type of the configuration set that was deleted.
DefaultSenderId (string) --
The default Sender ID of the configuration set that was deleted.
DefaultMessageFeedbackEnabled (boolean) --
True if the configuration set has message feedback enabled. By default this is set to false.
CreatedTimestamp (datetime) --
The time that the deleted configuration set was created in UNIX epoch time format.
{'EventDestination': {'MatchingEventTypes': {'TEXT_PROTECT_BLOCKED'}}}
Deletes an existing event destination.
An event destination is a location where you send response information about the messages that you send. For example, when a message is delivered successfully, you can send information about that event to an Amazon CloudWatch destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.
See also: AWS API Documentation
Request Syntax
client.delete_event_destination( ConfigurationSetName='string', EventDestinationName='string' )
string
[REQUIRED]
The name of the configuration set or the configuration set's Amazon Resource Name (ARN) to remove the event destination from. The ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.
string
[REQUIRED]
The name of the event destination to delete.
dict
Response Syntax
{ 'ConfigurationSetArn': 'string', 'ConfigurationSetName': 'string', 'EventDestination': { 'EventDestinationName': 'string', 'Enabled': True|False, 'MatchingEventTypes': [ 'ALL'|'TEXT_ALL'|'TEXT_SENT'|'TEXT_PENDING'|'TEXT_QUEUED'|'TEXT_SUCCESSFUL'|'TEXT_DELIVERED'|'TEXT_INVALID'|'TEXT_INVALID_MESSAGE'|'TEXT_UNREACHABLE'|'TEXT_CARRIER_UNREACHABLE'|'TEXT_BLOCKED'|'TEXT_CARRIER_BLOCKED'|'TEXT_SPAM'|'TEXT_UNKNOWN'|'TEXT_TTL_EXPIRED'|'TEXT_PROTECT_BLOCKED'|'VOICE_ALL'|'VOICE_INITIATED'|'VOICE_RINGING'|'VOICE_ANSWERED'|'VOICE_COMPLETED'|'VOICE_BUSY'|'VOICE_NO_ANSWER'|'VOICE_FAILED'|'VOICE_TTL_EXPIRED'|'MEDIA_ALL'|'MEDIA_PENDING'|'MEDIA_QUEUED'|'MEDIA_SUCCESSFUL'|'MEDIA_DELIVERED'|'MEDIA_INVALID'|'MEDIA_INVALID_MESSAGE'|'MEDIA_UNREACHABLE'|'MEDIA_CARRIER_UNREACHABLE'|'MEDIA_BLOCKED'|'MEDIA_CARRIER_BLOCKED'|'MEDIA_SPAM'|'MEDIA_UNKNOWN'|'MEDIA_TTL_EXPIRED'|'MEDIA_FILE_INACCESSIBLE'|'MEDIA_FILE_TYPE_UNSUPPORTED'|'MEDIA_FILE_SIZE_EXCEEDED', ], 'CloudWatchLogsDestination': { 'IamRoleArn': 'string', 'LogGroupArn': 'string' }, 'KinesisFirehoseDestination': { 'IamRoleArn': 'string', 'DeliveryStreamArn': 'string' }, 'SnsDestination': { 'TopicArn': 'string' } } }
Response Structure
(dict) --
ConfigurationSetArn (string) --
The Amazon Resource Name (ARN) of the configuration set.
ConfigurationSetName (string) --
The name of the configuration set the event destination was deleted from.
EventDestination (dict) --
The event destination object that was deleted.
EventDestinationName (string) --
The name of the EventDestination.
Enabled (boolean) --
When set to true events will be logged.
MatchingEventTypes (list) --
An array of event types that determine which events to log.
(string) --
CloudWatchLogsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon CloudWatch logs.
IamRoleArn (string) --
The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to write event data to an Amazon CloudWatch destination.
LogGroupArn (string) --
The name of the Amazon CloudWatch log group that you want to record events in.
KinesisFirehoseDestination (dict) --
An object that contains information about an event destination for logging to Amazon Data Firehose.
IamRoleArn (string) --
The ARN of an Identity and Access Management role that is able to write event data to an Amazon Data Firehose destination.
DeliveryStreamArn (string) --
The Amazon Resource Name (ARN) of the delivery stream.
SnsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon SNS.
TopicArn (string) --
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.
{'Filters': {'Name': {'default-message-feedback-enabled'}}}Response
{'ConfigurationSets': {'DefaultMessageFeedbackEnabled': 'boolean', 'EventDestinations': {'MatchingEventTypes': {'TEXT_PROTECT_BLOCKED'}}}}
Describes the specified configuration sets or all in your account.
If you specify configuration set names, the output includes information for only the specified configuration sets. If you specify filters, the output includes information for only those configuration sets that meet the filter criteria. If you don't specify configuration set names or filters, the output includes information for all configuration sets.
If you specify a configuration set name that isn't valid, an error is returned.
See also: AWS API Documentation
Request Syntax
client.describe_configuration_sets( ConfigurationSetNames=[ 'string', ], Filters=[ { 'Name': 'event-destination-name'|'matching-event-types'|'default-message-type'|'default-sender-id'|'default-message-feedback-enabled'|'protect-configuration-id', 'Values': [ 'string', ] }, ], NextToken='string', MaxResults=123 )
list
An array of strings. Each element can be either a ConfigurationSetName or ConfigurationSetArn.
(string) --
list
An array of filters to apply to the results that are returned.
(dict) --
The information for configuration sets that meet a specified criteria.
Name (string) -- [REQUIRED]
The name of the attribute to filter on.
Values (list) -- [REQUIRED]
An array values to filter for.
(string) --
string
The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.
integer
The maximum number of results to return per each request.
dict
Response Syntax
{ 'ConfigurationSets': [ { 'ConfigurationSetArn': 'string', 'ConfigurationSetName': 'string', 'EventDestinations': [ { 'EventDestinationName': 'string', 'Enabled': True|False, 'MatchingEventTypes': [ 'ALL'|'TEXT_ALL'|'TEXT_SENT'|'TEXT_PENDING'|'TEXT_QUEUED'|'TEXT_SUCCESSFUL'|'TEXT_DELIVERED'|'TEXT_INVALID'|'TEXT_INVALID_MESSAGE'|'TEXT_UNREACHABLE'|'TEXT_CARRIER_UNREACHABLE'|'TEXT_BLOCKED'|'TEXT_CARRIER_BLOCKED'|'TEXT_SPAM'|'TEXT_UNKNOWN'|'TEXT_TTL_EXPIRED'|'TEXT_PROTECT_BLOCKED'|'VOICE_ALL'|'VOICE_INITIATED'|'VOICE_RINGING'|'VOICE_ANSWERED'|'VOICE_COMPLETED'|'VOICE_BUSY'|'VOICE_NO_ANSWER'|'VOICE_FAILED'|'VOICE_TTL_EXPIRED'|'MEDIA_ALL'|'MEDIA_PENDING'|'MEDIA_QUEUED'|'MEDIA_SUCCESSFUL'|'MEDIA_DELIVERED'|'MEDIA_INVALID'|'MEDIA_INVALID_MESSAGE'|'MEDIA_UNREACHABLE'|'MEDIA_CARRIER_UNREACHABLE'|'MEDIA_BLOCKED'|'MEDIA_CARRIER_BLOCKED'|'MEDIA_SPAM'|'MEDIA_UNKNOWN'|'MEDIA_TTL_EXPIRED'|'MEDIA_FILE_INACCESSIBLE'|'MEDIA_FILE_TYPE_UNSUPPORTED'|'MEDIA_FILE_SIZE_EXCEEDED', ], 'CloudWatchLogsDestination': { 'IamRoleArn': 'string', 'LogGroupArn': 'string' }, 'KinesisFirehoseDestination': { 'IamRoleArn': 'string', 'DeliveryStreamArn': 'string' }, 'SnsDestination': { 'TopicArn': 'string' } }, ], 'DefaultMessageType': 'TRANSACTIONAL'|'PROMOTIONAL', 'DefaultSenderId': 'string', 'DefaultMessageFeedbackEnabled': True|False, 'CreatedTimestamp': datetime(2015, 1, 1), 'ProtectConfigurationId': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
ConfigurationSets (list) --
An array of ConfigurationSets objects.
(dict) --
Information related to a given configuration set in your Amazon Web Services account.
ConfigurationSetArn (string) --
The Resource Name (ARN) of the ConfigurationSet.
ConfigurationSetName (string) --
The name of the ConfigurationSet.
EventDestinations (list) --
An array of EventDestination objects that describe any events to log and where to log them.
(dict) --
Contains information about an event destination.
Event destinations are associated with configuration sets, which enable you to publish message sending events to CloudWatch, Firehose, or Amazon SNS.
EventDestinationName (string) --
The name of the EventDestination.
Enabled (boolean) --
When set to true events will be logged.
MatchingEventTypes (list) --
An array of event types that determine which events to log.
(string) --
CloudWatchLogsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon CloudWatch logs.
IamRoleArn (string) --
The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to write event data to an Amazon CloudWatch destination.
LogGroupArn (string) --
The name of the Amazon CloudWatch log group that you want to record events in.
KinesisFirehoseDestination (dict) --
An object that contains information about an event destination for logging to Amazon Data Firehose.
IamRoleArn (string) --
The ARN of an Identity and Access Management role that is able to write event data to an Amazon Data Firehose destination.
DeliveryStreamArn (string) --
The Amazon Resource Name (ARN) of the delivery stream.
SnsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon SNS.
TopicArn (string) --
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.
DefaultMessageType (string) --
The type of message. Valid values are TRANSACTIONAL for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
DefaultSenderId (string) --
The default sender ID used by the ConfigurationSet.
DefaultMessageFeedbackEnabled (boolean) --
True if message feedback is enabled.
CreatedTimestamp (datetime) --
The time when the ConfigurationSet was created, in UNIX epoch time format.
ProtectConfigurationId (string) --
The unique identifier for the protect configuration.
NextToken (string) --
The token to be used for the next set of paginated results. If this field is empty then there are no more results.
{'MessageFeedbackEnabled': 'boolean'}
Creates a new multimedia message (MMS) and sends it to a recipient's phone number.
See also: AWS API Documentation
Request Syntax
client.send_media_message( DestinationPhoneNumber='string', OriginationIdentity='string', MessageBody='string', MediaUrls=[ 'string', ], ConfigurationSetName='string', MaxPrice='string', TimeToLive=123, Context={ 'string': 'string' }, DryRun=True|False, ProtectConfigurationId='string', MessageFeedbackEnabled=True|False )
string
[REQUIRED]
The destination phone number in E.164 format.
string
[REQUIRED]
The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.
string
The text body of the message.
list
An array of URLs to each media file to send.
The media files have to be stored in a publicly available S3 bucket. Supported media file formats are listed in MMS file types, size and character limits. For more information on creating an S3 bucket and managing objects, see Creating a bucket and Uploading objects in the S3 user guide.
(string) --
string
The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
string
The maximum amount that you want to spend, in US dollars, per each MMS message.
integer
How long the media message is valid for. By default this is 72 hours.
dict
You can specify custom data in this field. If you do, that data is logged to the event destination.
(string) --
(string) --
boolean
When set to true, the message is checked and validated, but isn't sent to the end recipient.
string
The unique identifier of the protect configuration to use.
boolean
Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using PutMessageFeedback.
dict
Response Syntax
{ 'MessageId': 'string' }
Response Structure
(dict) --
MessageId (string) --
The unique identifier for the message.
{'MessageFeedbackEnabled': 'boolean'}
Creates a new text message and sends it to a recipient's phone number. SendTextMessage only sends an SMS message to one recipient each time it is invoked.
SMS throughput limits are measured in Message Parts per Second (MPS). Your MPS limit depends on the destination country of your messages, as well as the type of phone number (origination number) that you use to send the message. For more information about MPS, see Message Parts per Second (MPS) limits in the AWS End User Messaging SMS User Guide.
See also: AWS API Documentation
Request Syntax
client.send_text_message( DestinationPhoneNumber='string', OriginationIdentity='string', MessageBody='string', MessageType='TRANSACTIONAL'|'PROMOTIONAL', Keyword='string', ConfigurationSetName='string', MaxPrice='string', TimeToLive=123, Context={ 'string': 'string' }, DestinationCountryParameters={ 'string': 'string' }, DryRun=True|False, ProtectConfigurationId='string', MessageFeedbackEnabled=True|False )
string
[REQUIRED]
The destination phone number in E.164 format.
string
The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.
string
The body of the text message.
string
The type of message. Valid values are for messages that are critical or time-sensitive and PROMOTIONAL for messages that aren't critical or time-sensitive.
string
When you register a short code in the US, you must specify a program name. If you don’t have a US short code, omit this attribute.
string
The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
string
The maximum amount that you want to spend, in US dollars, per each text message. If the calculated amount to send the text message is greater than MaxPrice, the message is not sent and an error is returned.
integer
How long the text message is valid for, in seconds. By default this is 72 hours. If the messages isn't handed off before the TTL expires we stop attempting to hand off the message and return TTL_EXPIRED event.
dict
You can specify custom data in this field. If you do, that data is logged to the event destination.
(string) --
(string) --
dict
This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see Special requirements for sending SMS messages to recipients in India.
IN_ENTITY_ID The entity ID or Principal Entity (PE) ID that you received after completing the sender ID registration process.
IN_TEMPLATE_ID The template ID that you received after completing the sender ID registration process.
(string) --
(string) --
boolean
When set to true, the message is checked and validated, but isn't sent to the end recipient. You are not charged for using DryRun.
The Message Parts per Second (MPS) limit when using DryRun is five. If your origination identity has a lower MPS limit then the lower MPS limit is used. For more information about MPS limits, see Message Parts per Second (MPS) limits in the AWS End User Messaging SMS User Guide..
string
The unique identifier for the protect configuration.
boolean
Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using PutMessageFeedback.
dict
Response Syntax
{ 'MessageId': 'string' }
Response Structure
(dict) --
MessageId (string) --
The unique identifier for the message.
{'MessageFeedbackEnabled': 'boolean'}
Allows you to send a request that sends a voice message. This operation uses Amazon Polly to convert a text script into a voice message.
See also: AWS API Documentation
Request Syntax
client.send_voice_message( DestinationPhoneNumber='string', OriginationIdentity='string', MessageBody='string', MessageBodyTextType='TEXT'|'SSML', VoiceId='AMY'|'ASTRID'|'BIANCA'|'BRIAN'|'CAMILA'|'CARLA'|'CARMEN'|'CELINE'|'CHANTAL'|'CONCHITA'|'CRISTIANO'|'DORA'|'EMMA'|'ENRIQUE'|'EWA'|'FILIZ'|'GERAINT'|'GIORGIO'|'GWYNETH'|'HANS'|'INES'|'IVY'|'JACEK'|'JAN'|'JOANNA'|'JOEY'|'JUSTIN'|'KARL'|'KENDRA'|'KIMBERLY'|'LEA'|'LIV'|'LOTTE'|'LUCIA'|'LUPE'|'MADS'|'MAJA'|'MARLENE'|'MATHIEU'|'MATTHEW'|'MAXIM'|'MIA'|'MIGUEL'|'MIZUKI'|'NAJA'|'NICOLE'|'PENELOPE'|'RAVEENA'|'RICARDO'|'RUBEN'|'RUSSELL'|'SALLI'|'SEOYEON'|'TAKUMI'|'TATYANA'|'VICKI'|'VITORIA'|'ZEINA'|'ZHIYU', ConfigurationSetName='string', MaxPricePerMinute='string', TimeToLive=123, Context={ 'string': 'string' }, DryRun=True|False, ProtectConfigurationId='string', MessageFeedbackEnabled=True|False )
string
[REQUIRED]
The destination phone number in E.164 format.
string
[REQUIRED]
The origination identity to use for the voice call. This can be the PhoneNumber, PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.
string
The text to convert to a voice message.
string
Specifies if the MessageBody field contains text or speech synthesis markup language (SSML).
TEXT: This is the default value. When used the maximum character limit is 3000.
SSML: When used the maximum character limit is 6000 including SSML tagging.
string
The voice for the Amazon Polly service to use. By default this is set to "MATTHEW".
string
The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
string
The maximum amount to spend per voice message, in US dollars.
integer
How long the voice message is valid for. By default this is 72 hours.
dict
You can specify custom data in this field. If you do, that data is logged to the event destination.
(string) --
(string) --
boolean
When set to true, the message is checked and validated, but isn't sent to the end recipient.
string
The unique identifier for the protect configuration.
boolean
Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using PutMessageFeedback.
dict
Response Syntax
{ 'MessageId': 'string' }
Response Structure
(dict) --
MessageId (string) --
The unique identifier for the message.
{'MatchingEventTypes': {'TEXT_PROTECT_BLOCKED'}}Response
{'EventDestination': {'MatchingEventTypes': {'TEXT_PROTECT_BLOCKED'}}}
Updates an existing event destination in a configuration set. You can update the IAM role ARN for CloudWatch Logs and Firehose. You can also enable or disable the event destination.
You may want to update an event destination to change its matching event types or updating the destination resource ARN. You can't change an event destination's type between CloudWatch Logs, Firehose, and Amazon SNS.
See also: AWS API Documentation
Request Syntax
client.update_event_destination( ConfigurationSetName='string', EventDestinationName='string', Enabled=True|False, MatchingEventTypes=[ 'ALL'|'TEXT_ALL'|'TEXT_SENT'|'TEXT_PENDING'|'TEXT_QUEUED'|'TEXT_SUCCESSFUL'|'TEXT_DELIVERED'|'TEXT_INVALID'|'TEXT_INVALID_MESSAGE'|'TEXT_UNREACHABLE'|'TEXT_CARRIER_UNREACHABLE'|'TEXT_BLOCKED'|'TEXT_CARRIER_BLOCKED'|'TEXT_SPAM'|'TEXT_UNKNOWN'|'TEXT_TTL_EXPIRED'|'TEXT_PROTECT_BLOCKED'|'VOICE_ALL'|'VOICE_INITIATED'|'VOICE_RINGING'|'VOICE_ANSWERED'|'VOICE_COMPLETED'|'VOICE_BUSY'|'VOICE_NO_ANSWER'|'VOICE_FAILED'|'VOICE_TTL_EXPIRED'|'MEDIA_ALL'|'MEDIA_PENDING'|'MEDIA_QUEUED'|'MEDIA_SUCCESSFUL'|'MEDIA_DELIVERED'|'MEDIA_INVALID'|'MEDIA_INVALID_MESSAGE'|'MEDIA_UNREACHABLE'|'MEDIA_CARRIER_UNREACHABLE'|'MEDIA_BLOCKED'|'MEDIA_CARRIER_BLOCKED'|'MEDIA_SPAM'|'MEDIA_UNKNOWN'|'MEDIA_TTL_EXPIRED'|'MEDIA_FILE_INACCESSIBLE'|'MEDIA_FILE_TYPE_UNSUPPORTED'|'MEDIA_FILE_SIZE_EXCEEDED', ], CloudWatchLogsDestination={ 'IamRoleArn': 'string', 'LogGroupArn': 'string' }, KinesisFirehoseDestination={ 'IamRoleArn': 'string', 'DeliveryStreamArn': 'string' }, SnsDestination={ 'TopicArn': 'string' } )
string
[REQUIRED]
The configuration set to update with the new event destination. Valid values for this can be the ConfigurationSetName or ConfigurationSetArn.
string
[REQUIRED]
The name to use for the event destination.
boolean
When set to true logging is enabled.
list
An array of event types that determine which events to log.
(string) --
dict
An object that contains information about an event destination that sends data to CloudWatch Logs.
IamRoleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to write event data to an Amazon CloudWatch destination.
LogGroupArn (string) -- [REQUIRED]
The name of the Amazon CloudWatch log group that you want to record events in.
dict
An object that contains information about an event destination for logging to Firehose.
IamRoleArn (string) -- [REQUIRED]
The ARN of an Identity and Access Management role that is able to write event data to an Amazon Data Firehose destination.
DeliveryStreamArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the delivery stream.
dict
An object that contains information about an event destination that sends data to Amazon SNS.
TopicArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.
dict
Response Syntax
{ 'ConfigurationSetArn': 'string', 'ConfigurationSetName': 'string', 'EventDestination': { 'EventDestinationName': 'string', 'Enabled': True|False, 'MatchingEventTypes': [ 'ALL'|'TEXT_ALL'|'TEXT_SENT'|'TEXT_PENDING'|'TEXT_QUEUED'|'TEXT_SUCCESSFUL'|'TEXT_DELIVERED'|'TEXT_INVALID'|'TEXT_INVALID_MESSAGE'|'TEXT_UNREACHABLE'|'TEXT_CARRIER_UNREACHABLE'|'TEXT_BLOCKED'|'TEXT_CARRIER_BLOCKED'|'TEXT_SPAM'|'TEXT_UNKNOWN'|'TEXT_TTL_EXPIRED'|'TEXT_PROTECT_BLOCKED'|'VOICE_ALL'|'VOICE_INITIATED'|'VOICE_RINGING'|'VOICE_ANSWERED'|'VOICE_COMPLETED'|'VOICE_BUSY'|'VOICE_NO_ANSWER'|'VOICE_FAILED'|'VOICE_TTL_EXPIRED'|'MEDIA_ALL'|'MEDIA_PENDING'|'MEDIA_QUEUED'|'MEDIA_SUCCESSFUL'|'MEDIA_DELIVERED'|'MEDIA_INVALID'|'MEDIA_INVALID_MESSAGE'|'MEDIA_UNREACHABLE'|'MEDIA_CARRIER_UNREACHABLE'|'MEDIA_BLOCKED'|'MEDIA_CARRIER_BLOCKED'|'MEDIA_SPAM'|'MEDIA_UNKNOWN'|'MEDIA_TTL_EXPIRED'|'MEDIA_FILE_INACCESSIBLE'|'MEDIA_FILE_TYPE_UNSUPPORTED'|'MEDIA_FILE_SIZE_EXCEEDED', ], 'CloudWatchLogsDestination': { 'IamRoleArn': 'string', 'LogGroupArn': 'string' }, 'KinesisFirehoseDestination': { 'IamRoleArn': 'string', 'DeliveryStreamArn': 'string' }, 'SnsDestination': { 'TopicArn': 'string' } } }
Response Structure
(dict) --
ConfigurationSetArn (string) --
The Amazon Resource Name (ARN) for the ConfigurationSet that was updated.
ConfigurationSetName (string) --
The name of the configuration set.
EventDestination (dict) --
An EventDestination object containing the details of where events will be logged.
EventDestinationName (string) --
The name of the EventDestination.
Enabled (boolean) --
When set to true events will be logged.
MatchingEventTypes (list) --
An array of event types that determine which events to log.
(string) --
CloudWatchLogsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon CloudWatch logs.
IamRoleArn (string) --
The Amazon Resource Name (ARN) of an Identity and Access Management role that is able to write event data to an Amazon CloudWatch destination.
LogGroupArn (string) --
The name of the Amazon CloudWatch log group that you want to record events in.
KinesisFirehoseDestination (dict) --
An object that contains information about an event destination for logging to Amazon Data Firehose.
IamRoleArn (string) --
The ARN of an Identity and Access Management role that is able to write event data to an Amazon Data Firehose destination.
DeliveryStreamArn (string) --
The Amazon Resource Name (ARN) of the delivery stream.
SnsDestination (dict) --
An object that contains information about an event destination that sends logging events to Amazon SNS.
TopicArn (string) --
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.