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

*****************************
delete_whatsapp_message_media
*****************************



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

  

  Delete a media object from the WhatsApp service. If the object is still in an Amazon S3 bucket you should delete it from there too.

  

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


  **Request Syntax**
  ::

    response = client.delete_whatsapp_message_media(
        mediaId='string',
        originationPhoneNumberId='string'
    )
    
  :type mediaId: string
  :param mediaId: **[REQUIRED]** 

    The unique identifier of the media file to delete. Use the ``mediaId`` returned from `PostWhatsAppMessageMedia <https://console.aws.amazon.com/social-messaging/latest/APIReference/API_PostWhatsAppMessageMedia.html>`__.

    

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

    The unique identifier of the originating phone number associated with the media. Phone number identifiers are formatted as ``phone-number-id-01234567890123456789012345678901``. Use `GetLinkedWhatsAppBusinessAccount <https://docs.aws.amazon.com/social-messaging/latest/APIReference/API_GetLinkedWhatsAppBusinessAccount.html>`__ to find a phone number's id.

    

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

    
    ::

      {
          'success': True|False
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **success** *(boolean) --* 

        Success indicator for deleting the media file.

        
  
  **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.AccessDeniedByMetaException`

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

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

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

  