ChimeSDKMessaging / Client / create_channel_flow
create_channel_flow#
- ChimeSDKMessaging.Client.create_channel_flow(**kwargs)#
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
Note
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.
See also: AWS API Documentation
Request Syntax
response = client.create_channel_flow( AppInstanceArn='string', Processors=[ { 'Name': 'string', 'Configuration': { 'Lambda': { 'ResourceArn': 'string', 'InvocationType': 'ASYNC' } }, 'ExecutionOrder': 123, 'FallbackAction': 'CONTINUE'|'ABORT' }, ], Name='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ], ClientRequestToken='string' )
- Parameters:
AppInstanceArn (string) –
[REQUIRED]
The ARN of the channel flow request.
Processors (list) –
[REQUIRED]
Information about the processor Lambda functions.
(dict) –
The information about a processor in a channel flow.
Name (string) – [REQUIRED]
The name of the channel flow.
Configuration (dict) – [REQUIRED]
The information about the type of processor and its identifier.
Lambda (dict) – [REQUIRED]
Indicates that the processor is of type Lambda.
ResourceArn (string) – [REQUIRED]
The ARN of the Lambda message processing function.
InvocationType (string) – [REQUIRED]
Controls how the Lambda function is invoked.
ExecutionOrder (integer) – [REQUIRED]
The sequence in which processors run. If you have multiple processors in a channel flow, message processing goes through each processor in the sequence. The value determines the sequence. At this point, we support only 1 processor within a flow.
FallbackAction (string) – [REQUIRED]
Determines whether to continue with message processing or stop it in cases where communication with a processor fails. If a processor has a fallback action of
ABORT
and communication with it fails, the processor sets the message status toFAILED
and does not send the message to any recipients. Note that if the last processor in the channel flow sequence has a fallback action ofCONTINUE
and communication with the processor fails, then the message is considered processed and sent to recipients of the channel.
Name (string) –
[REQUIRED]
The name of the channel flow.
Tags (list) –
The tags for the creation request.
(dict) –
A tag object containing a key-value pair.
Key (string) – [REQUIRED]
The key in a tag.
Value (string) – [REQUIRED]
The value in a tag.
ClientRequestToken (string) –
[REQUIRED]
The client token for the request. An Idempotency token.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'ChannelFlowArn': 'string' }
Response Structure
(dict) –
ChannelFlowArn (string) –
The ARN of the channel flow.
Exceptions
ChimeSDKMessaging.Client.exceptions.BadRequestException
ChimeSDKMessaging.Client.exceptions.ForbiddenException
ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException
ChimeSDKMessaging.Client.exceptions.ConflictException
ChimeSDKMessaging.Client.exceptions.ResourceLimitExceededException
ChimeSDKMessaging.Client.exceptions.ThrottledClientException
ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException
ChimeSDKMessaging.Client.exceptions.ServiceFailureException