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.
Parameters:
-
app_instance_arn
(ChimeArn)
–
The ARN of the channel flow request.
-
processors
(ProcessorList)
–
Information about the processor Lambda functions.
-
name
(NonEmptyResourceName)
–
The name of the channel flow.
-
tags
(Optional[TagList], default:
None
)
–
The tags for the creation request.
-
client_request_token
(ClientRequestToken)
–
The client token for the request. An Idempotency token.
Raises:
Source code in docs_src/capo_chime_sdk_messaging/_services/async_chime_sdk_messaging.py
| async def create_channel_flow(
self,
app_instance_arn: "capo_chime_sdk_messaging.types.chime_arn.ChimeArn",
processors: "capo_chime_sdk_messaging.types.processor_list.ProcessorList",
name: "capo_chime_sdk_messaging.types.non_empty_resource_name.NonEmptyResourceName",
client_request_token: "capo_chime_sdk_messaging.types.client_request_token.ClientRequestToken",
*,
config_overrides: Optional[AsyncChimeSDKMessagingClientConfig] = None,
tags: Optional["capo_chime_sdk_messaging.types.tag_list.TagList"] = None,
) -> "capo_chime_sdk_messaging.types.create_channel_flow_response.CreateChannelFlowResponse":
"""<p>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.</p> <p>Channel flows process the following items:</p> <ol> <li> <p>New and updated messages</p> </li> <li> <p>Persistent and non-persistent messages</p> </li> <li> <p>The Standard message type</p> </li> </ol> <note> <p>Channel flows don't process Control or System messages. For more information about the message types provided by Chime SDK messaging, refer to <a href="https://docs.aws.amazon.com/chime-sdk/latest/dg/using-the-messaging-sdk.html#msg-types">Message types</a> in the <i>Amazon Chime developer guide</i>.</p> </note>
Args:
app_instance_arn: <p>The ARN of the channel flow request.</p>
processors: <p>Information about the processor Lambda functions.</p>
name: <p>The name of the channel flow.</p>
tags: <p>The tags for the creation request.</p>
client_request_token: <p>The client token for the request. An Idempotency token.</p>
Raises:
capo_chime_sdk_messaging.errors.bad_request_exception.BadRequestException: <p>The input parameters don't match the service's restrictions.</p>
capo_chime_sdk_messaging.errors.conflict_exception.ConflictException: <p>The request could not be processed because of conflict in the current state of the resource.</p>
capo_chime_sdk_messaging.errors.forbidden_exception.ForbiddenException: <p>The client is permanently forbidden from making the request.</p>
capo_chime_sdk_messaging.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>The request exceeds the resource limit.</p>
capo_chime_sdk_messaging.errors.service_failure_exception.ServiceFailureException: <p>The service encountered an unexpected error.</p>
capo_chime_sdk_messaging.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
capo_chime_sdk_messaging.errors.throttled_client_exception.ThrottledClientException: <p>The client exceeded its request rate limit.</p>
capo_chime_sdk_messaging.errors.unauthorized_client_exception.UnauthorizedClientException: <p>The client is not currently authorized to make the request.</p>
capo_chime_sdk_messaging.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_chime_sdk_messaging.types.create_channel_flow_request.CreateChannelFlowRequest]",
) -> AsyncOperationResponse[
"capo_chime_sdk_messaging.types.create_channel_flow_response.CreateChannelFlowResponse"
]:
import capo_chime_sdk_messaging._operations.chime_messaging_service.create_channel_flow
(
output,
http_response,
) = await capo_chime_sdk_messaging._operations.chime_messaging_service.create_channel_flow.async_create_channel_flow(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_chime_sdk_messaging.types.create_channel_flow_request.CreateChannelFlowRequest",
) -> dict[str, Any]:
import capo_chime_sdk_messaging.types.create_channel_flow_request
return capo_chime_sdk_messaging.types.create_channel_flow_request.redact_sensitive(
input_
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("CreateChannelFlow", redact_input=_redact_input),
)
input_: capo_chime_sdk_messaging.types.create_channel_flow_request.CreateChannelFlowRequest = {
"app_instance_arn": app_instance_arn,
"processors": processors,
"name": name,
"client_request_token": client_request_token,
}
if tags is not None:
input_["tags"] = tags
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|