Skip to main content

channel_flows

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

Overview

Namechannel_flows
TypeResource
Idaws.chime_sdk_messaging.channel_flows

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
channel_flowsarrayThe information about each channel flow.
next_tokenstringThe token passed by previous API calls until all requested channels are returned. (pattern: <code>.*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_channel_flowsselectapp-instance-arn, regionmax-results, next-tokenReturns a paginated lists of all the channel flows created under a single Chime. This is a developer API.
describe_channel_flowselectchannel_flow_arn, regionReturns the full details of a channel flow in an Amazon Chime AppInstance. This is a developer API.
create_channel_flowinsertregion, AppInstanceArn, Processors, Name, ClientRequestTokenCreates a channel flow, a container for processors. Processors are AWS Lambda functions that perform actions on chat messages, such as stripping out profanity. You can associate channel flows with channels, and the processors in the channel flow then take action on all messages sent to that channel. This is a developer API. Channel flows process the following items: New and updated messages Persistent and non-persistent messages The Standard message type Channel flows don't process Control or System messages. For more information about the message types provided by Chime SDK messaging, refer to Message types in the Amazon Chime developer guide.
associate_channel_flowupdatechannel_arn, x-amz-chime-bearer, region, ChannelFlowArnAssociates a channel flow with a channel. Once associated, all messages to that channel go through channel flow processors. To stop processing, use the DisassociateChannelFlow API. Only administrators or channel moderators can associate a channel flow. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
update_channel_flowupdatechannel_flow_arn, region, Processors, NameUpdates channel flow attributes. This is a developer API.
disassociate_channel_flowupdatechannel_arn, channel_flow_arn, x-amz-chime-bearer, regionDisassociates a channel flow from all its channels. Once disassociated, all messages to that channel stop going through the channel flow processor. Only administrators or channel moderators can disassociate a channel flow. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
delete_channel_flowdeletechannel_flow_arn, regionDeletes a channel flow, an irreversible process. This is a developer API. This API works only when the channel flow is not associated with any channel. To get a list of all channels that a channel flow is associated with, use the ListChannelsAssociatedWithChannelFlow API. Use the DisassociateChannelFlow API to disassociate a channel flow from all channels.
channel_flow_callbackexecchannel_arn, region, CallbackId, ChannelMessageCalls back Amazon Chime SDK messaging with a processing response message. This should be invoked from the processor Lambda. This is a developer API. You can return one of the following processing responses: Update message content or metadata Deny a message Make no changes to the message

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
app-instance-arnstringThe ARN of the app instance.
channel_arnstringThe ARN of the channel.
channel_flow_arnstringThe ARN of the channel flow.
regionstringAWS region (default: us-east-1)
x-amz-chime-bearerstringThe AppInstanceUserArn of the user making the API call.
max-resultsintegerThe maximum number of channel flows that you want to return.
next-tokenstringThe token passed by previous API calls until all requested channel flows are returned.

SELECT examples

Returns a paginated lists of all the channel flows created under a single Chime. This is a developer API.

SELECT
channel_flows,
next_token
FROM aws.chime_sdk_messaging.channel_flows
WHERE `app-instance-arn` = '{{ app-instance-arn }}' -- required
AND region = '{{ region }}' -- required
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
;

INSERT examples

Creates a channel flow, a container for processors. Processors are AWS Lambda functions that perform actions on chat messages, such as stripping out profanity. You can associate channel flows with channels, and the processors in the channel flow then take action on all messages sent to that channel. This is a developer API. Channel flows process the following items: New and updated messages Persistent and non-persistent messages The Standard message type Channel flows don't process Control or System messages. For more information about the message types provided by Chime SDK messaging, refer to Message types in the Amazon Chime developer guide.

INSERT INTO aws.chime_sdk_messaging.channel_flows (
AppInstanceArn,
Processors,
Name,
Tags,
ClientRequestToken,
region
)
SELECT
'{{ AppInstanceArn }}' /* required */,
'{{ Processors }}' /* required */,
'{{ Name }}' /* required */,
'{{ Tags }}',
'{{ ClientRequestToken }}' /* required */,
'{{ region }}'
RETURNING
channel_flow_arn
;

UPDATE examples

Associates a channel flow with a channel. Once associated, all messages to that channel go through channel flow processors. To stop processing, use the DisassociateChannelFlow API. Only administrators or channel moderators can associate a channel flow. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

UPDATE aws.chime_sdk_messaging.channel_flows
SET
ChannelFlowArn = '{{ ChannelFlowArn }}'
WHERE
channel_arn = '{{ channel_arn }}' --required
AND `x-amz-chime-bearer` = '{{ x-amz-chime-bearer }}' --required
AND region = '{{ region }}' --required
AND ChannelFlowArn = '{{ ChannelFlowArn }}' --required;

DELETE examples

Deletes a channel flow, an irreversible process. This is a developer API. This API works only when the channel flow is not associated with any channel. To get a list of all channels that a channel flow is associated with, use the ListChannelsAssociatedWithChannelFlow API. Use the DisassociateChannelFlow API to disassociate a channel flow from all channels.

DELETE FROM aws.chime_sdk_messaging.channel_flows
WHERE channel_flow_arn = '{{ channel_flow_arn }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Calls back Amazon Chime SDK messaging with a processing response message. This should be invoked from the processor Lambda. This is a developer API. You can return one of the following processing responses: Update message content or metadata Deny a message Make no changes to the message

EXEC aws.chime_sdk_messaging.channel_flows.channel_flow_callback
@channel_arn='{{ channel_arn }}' --required,
@region='{{ region }}' --required
@@json=
'{
"CallbackId": "{{ CallbackId }}",
"DeleteResource": {{ DeleteResource }},
"ChannelMessage": "{{ ChannelMessage }}"
}'
;