whats_app_message_medias
Creates, updates, deletes, gets or lists a whats_app_message_medias resource.
Overview
| Name | whats_app_message_medias |
| Type | Resource |
| Id | aws.socialmessaging.whats_app_message_medias |
Fields
The following fields are returned by SELECT queries:
- get_whats_app_message_media
| Name | Datatype | Description |
|---|---|---|
file_size | integer (int64) | The size of the media file, in KB. |
mime_type | string | The MIME type of the media. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_whats_app_message_media | select | region | Get a media file from the WhatsApp service. On successful completion the media file is retrieved from Meta and stored in the specified Amazon S3 bucket. Use either destinationS3File or destinationS3PresignedUrl for the destination. If both are used then an InvalidParameterException is returned. | |
delete_whats_app_message_media | delete | mediaId, originationPhoneNumberId, region | 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. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
mediaId | string | The unique identifier of the media file to delete. Use the mediaId returned from PostWhatsAppMessageMedia. |
originationPhoneNumberId | string | The unique identifier of the originating phone number associated with the media. Phone number identifiers are formatted as phone-number-id-01234567890123456789012345678901. Use GetLinkedWhatsAppBusinessAccount to find a phone number's id. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_whats_app_message_media
Get a media file from the WhatsApp service. On successful completion the media file is retrieved from Meta and stored in the specified Amazon S3 bucket. Use either destinationS3File or destinationS3PresignedUrl for the destination. If both are used then an InvalidParameterException is returned.
SELECT
file_size,
mime_type
FROM aws.socialmessaging.whats_app_message_medias
WHERE region = '{{ region }}' -- required
;
DELETE examples
- delete_whats_app_message_media
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.
DELETE FROM aws.socialmessaging.whats_app_message_medias
WHERE mediaId = '{{ mediaId }}' --required
AND originationPhoneNumberId = '{{ originationPhoneNumberId }}' --required
AND region = '{{ region }}' --required
;