Skip to main content

whats_app_flow_assets

Creates, updates, deletes, gets or lists a whats_app_flow_assets resource.

Overview

Namewhats_app_flow_assets
TypeResource
Idaws.socialmessaging.whats_app_flow_assets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe filename of the asset (for example, flow.json).
asset_typestringThe type of asset. Currently the only supported value is FLOW_JSON.
download_urlstringA presigned URL from Meta for downloading the asset. The URL expires after a short period.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_whats_app_flow_assetsselectid, flowId, regionnextToken, maxResultsLists the assets (Flow JSON definition) of a WhatsApp Flow with presigned download URLs. Download URLs are generated by Meta and expire after a short period.
update_whats_app_flow_assetsupdateregion, id, flowId, flowJsonUpdates the Flow JSON definition (assets) of a WhatsApp Flow. Updating a published Flow's assets reverts it to DRAFT status, requiring re-publishing.

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.

NameDatatypeDescription
flowIdstringThe unique identifier of the Flow whose assets to list.
idstringThe ID of the WhatsApp Business Account associated with this Flow.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return per page.
nextTokenstringThe token for the next page of results.

SELECT examples

Lists the assets (Flow JSON definition) of a WhatsApp Flow with presigned download URLs. Download URLs are generated by Meta and expire after a short period.

SELECT
name,
asset_type,
download_url
FROM aws.socialmessaging.whats_app_flow_assets
WHERE id = '{{ id }}' -- required
AND flowId = '{{ flowId }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;

UPDATE examples

Updates the Flow JSON definition (assets) of a WhatsApp Flow. Updating a published Flow's assets reverts it to DRAFT status, requiring re-publishing.

UPDATE aws.socialmessaging.whats_app_flow_assets
SET
id = '{{ id }}',
flowId = '{{ flowId }}',
flowJson = '{{ flowJson }}'
WHERE
region = '{{ region }}' --required
AND id = '{{ id }}' --required
AND flowId = '{{ flowId }}' --required
AND flowJson = '{{ flowJson }}' --required
RETURNING
validation_errors;