PinpointSMSVoiceV2 / Client / send_media_message
send_media_message#
- PinpointSMSVoiceV2.Client.send_media_message(**kwargs)#
Creates a new multimedia message (MMS) and sends it to a recipient’s phone number.
See also: AWS API Documentation
Request Syntax
response = 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' )
- Parameters:
DestinationPhoneNumber (string) –
[REQUIRED]
The destination phone number in E.164 format.
OriginationIdentity (string) –
[REQUIRED]
The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.
MessageBody (string) – The text body of the message.
MediaUrls (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) –
ConfigurationSetName (string) – The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
MaxPrice (string) – The maximum amount that you want to spend, in US dollars, per each MMS message.
TimeToLive (integer) – How long the text message is valid for. By default this is 72 hours.
Context (dict) –
You can specify custom data in this field. If you do, that data is logged to the event destination.
(string) –
(string) –
DryRun (boolean) – When set to true, the message is checked and validated, but isn’t sent to the end recipient.
ProtectConfigurationId (string) – The unique identifier of the protect configuration to use.
- Return type:
dict
- Returns:
Response Syntax
{ 'MessageId': 'string' }
Response Structure
(dict) –
MessageId (string) –
The unique identifier for the message.
Exceptions
PinpointSMSVoiceV2.Client.exceptions.ServiceQuotaExceededException
PinpointSMSVoiceV2.Client.exceptions.ThrottlingException
PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException
PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException
PinpointSMSVoiceV2.Client.exceptions.ValidationException
PinpointSMSVoiceV2.Client.exceptions.ConflictException
PinpointSMSVoiceV2.Client.exceptions.InternalServerException