channelFlowCallback method
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
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter channelArn :
The ARN of the channel.
Parameter channelMessage :
Stores information about the processed message.
Parameter callbackId :
The identifier passed to the processor by the service when invoked. Use
the identifier to call back the service.
Parameter deleteResource :
When a processor determines that a message needs to be
DENIED, pass this parameter with a value of true.
Implementation
Future<ChannelFlowCallbackResponse> channelFlowCallback({
required String channelArn,
required ChannelMessageCallback channelMessage,
String? callbackId,
bool? deleteResource,
}) async {
final $payload = <String, dynamic>{
'ChannelMessage': channelMessage,
'CallbackId': callbackId ?? _s.generateIdempotencyToken(),
if (deleteResource != null) 'DeleteResource': deleteResource,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/channels/${Uri.encodeComponent(channelArn)}?operation=channel-flow-callback',
exceptionFnMap: _exceptionFns,
);
return ChannelFlowCallbackResponse.fromJson(response);
}