:doc:`PinpointSMSVoiceV2 <../../pinpoint-sms-voice-v2>` / Client / send_media_message

******************
send_media_message
******************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-v2-2022-03-31/SendMediaMessage>`_  


  **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',
        MessageFeedbackEnabled=True|False
    )
    
  :type DestinationPhoneNumber: string
  :param DestinationPhoneNumber: **[REQUIRED]** 

    The destination phone number in E.164 format.

    

  
  :type OriginationIdentity: string
  :param OriginationIdentity: **[REQUIRED]** 

    The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

     

    .. warning::

       

      If you are using a shared End User Messaging SMS resource then you must use the full Amazon Resource Name(ARN).

      

    

  
  :type MessageBody: string
  :param MessageBody: 

    The text body of the message.

    

  
  :type MediaUrls: list
  :param MediaUrls: 

    An array of URLs to each media file to send.

     

    The media files have to be stored in an S3 bucket. Supported media file formats are listed in `MMS file types, size and character limits <https://docs.aws.amazon.com/sms-voice/latest/userguide/mms-limitations-character.html>`__. For more information on creating an S3 bucket and managing objects, see `Creating a bucket <https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html>`__, `Uploading objects <https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html>`__ in the *Amazon S3 User Guide*, and `Setting up an Amazon S3 bucket for MMS files <https://docs.aws.amazon.com/sms-voice/latest/userguide/send-mms-message.html#send-mms-message-bucket>`__ in the *Amazon Web Services End User Messaging SMS User Guide*.

    

  
    - *(string) --* 

    

  :type ConfigurationSetName: string
  :param ConfigurationSetName: 

    The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.

    

  
  :type MaxPrice: string
  :param MaxPrice: 

    The maximum amount that you want to spend, in US dollars, per each MMS message.

    

  
  :type TimeToLive: integer
  :param TimeToLive: 

    How long the media message is valid for. By default this is 72 hours.

    

  
  :type Context: dict
  :param Context: 

    You can specify custom data in this field. If you do, that data is logged to the event destination.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type DryRun: boolean
  :param DryRun: 

    When set to true, the message is checked and validated, but isn't sent to the end recipient.

    

  
  :type ProtectConfigurationId: string
  :param ProtectConfigurationId: 

    The unique identifier of the protect configuration to use.

    

  
  :type MessageFeedbackEnabled: boolean
  :param MessageFeedbackEnabled: 

    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.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'MessageId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **MessageId** *(string) --* 

        The unique identifier for the message.

        
  
  **Exceptions**
  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ThrottlingException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ValidationException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ConflictException`

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.InternalServerException`

  