startContactMediaProcessing method

Future<void> startContactMediaProcessing({
  1. String? contactId,
  2. ContactMediaProcessingFailureMode? failureMode,
  3. String? instanceId,
  4. String? processorArn,
})

Enables in-flight message processing for an ongoing chat session. Message processing will stay active for the rest of the chat, even if an individual contact segment ends.

May throw AccessDeniedException. May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException.

Parameter contactId : The identifier of the contact.

Parameter failureMode : The desired behavior for failed message processing.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Parameter processorArn : The Amazon Resource Name (ARN) of the Lambda processor. You can find the Amazon Resource Name of the lambda in the lambda console.

Implementation

Future<void> startContactMediaProcessing({
  String? contactId,
  ContactMediaProcessingFailureMode? failureMode,
  String? instanceId,
  String? processorArn,
}) async {
  final $payload = <String, dynamic>{
    if (contactId != null) 'ContactId': contactId,
    if (failureMode != null) 'FailureMode': failureMode.value,
    if (instanceId != null) 'InstanceId': instanceId,
    if (processorArn != null) 'ProcessorArn': processorArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/contact/start-contact-media-processing',
    exceptionFnMap: _exceptionFns,
  );
}