:doc:`EndUserMessagingSocial <../../socialmessaging>` / Client / create_whatsapp_message_template_media

**************************************
create_whatsapp_message_template_media
**************************************



.. py:method:: EndUserMessagingSocial.Client.create_whatsapp_message_template_media(**kwargs)

  

  Uploads media for use in a WhatsApp message template.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/socialmessaging-2024-01-01/CreateWhatsAppMessageTemplateMedia>`_  


  **Request Syntax**
  ::

    response = client.create_whatsapp_message_template_media(
        id='string',
        sourceS3File={
            'bucketName': 'string',
            'key': 'string'
        }
    )
    
  :type id: string
  :param id: **[REQUIRED]** 

    The ID of the WhatsApp Business Account associated with this media upload.

    

  
  :type sourceS3File: dict
  :param sourceS3File: 

    Contains information for the S3 bucket that contains media files.

    

  
    - **bucketName** *(string) --* **[REQUIRED]** 

      The bucket name.

      

    
    - **key** *(string) --* **[REQUIRED]** 

      The S3 key prefix that defines the storage location of your media files. The prefix works like a folder path in S3, and is combined with the WhatsApp mediaId to create the final file path.

       

      For example, if a media file's WhatsApp mediaId is ``123.ogg``, and the key is ``audio/example.ogg``, the final file path is ``audio/example.ogg123.ogg``.

       

      For the same mediaId, a key of ``audio/`` results in the file path ``audio/123.ogg``.

      

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

    
    ::

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

    

    - *(dict) --* 
      

      - **metaHeaderHandle** *(string) --* 

        The handle assigned to the uploaded media by Meta, used to reference the media in templates.

        
  
  **Exceptions**
  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ValidationException`

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

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

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.InvalidParametersException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.ThrottledRequestException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.InternalServiceException`

  
  *   :py:class:`EndUserMessagingSocial.Client.exceptions.DependencyException`

  