Skip to content

start_contact_media_processing

start_contact_media_processing(
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    instance_id: Optional[InstanceId] = None,
    contact_id: Optional[ContactId] = None,
    processor_arn: Optional[ARN] = None,
    failure_mode: Optional[ContactMediaProcessingFailureMode] = None,
) -> StartContactMediaProcessingResponse

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.

Parameters:

  • instance_id (Optional[InstanceId], default: None ) –

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

  • contact_id (Optional[ContactId], default: None ) –

    The identifier of the contact.

  • processor_arn (Optional[ARN], default: None ) –

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

  • failure_mode (Optional[ContactMediaProcessingFailureMode], default: None ) –

    The desired behavior for failed message processing.

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def start_contact_media_processing(
    self,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    instance_id: Optional["capo_connect.types.instance_id.InstanceId"] = None,
    contact_id: Optional["capo_connect.types.contact_id.ContactId"] = None,
    processor_arn: Optional["capo_connect.types.arn.ARN"] = None,
    failure_mode: Optional[
        "capo_connect.types.contact_media_processing_failure_mode.ContactMediaProcessingFailureMode"
    ] = None,
) -> "capo_connect.types.start_contact_media_processing_response.StartContactMediaProcessingResponse":
    """<p> 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. </p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        contact_id: <p>The identifier of the contact.</p>
        processor_arn: <p> The Amazon Resource Name (ARN) of the Lambda processor. You can find the Amazon Resource Name of the lambda in the lambda console. </p>
        failure_mode: <p> The desired behavior for failed message processing. </p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.limit_exceeded_exception.LimitExceededException: <p>The allowed limit for the resource has been exceeded.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connect.types.start_contact_media_processing_request.StartContactMediaProcessingRequest]",
    ) -> OperationResponse[
        "capo_connect.types.start_contact_media_processing_response.StartContactMediaProcessingResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.start_contact_media_processing

        output, http_response = (
            capo_connect._operations.amazon_connect_service.start_contact_media_processing.start_contact_media_processing(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartContactMediaProcessing")
    )
    input_: capo_connect.types.start_contact_media_processing_request.StartContactMediaProcessingRequest = {}
    if instance_id is not None:
        input_["instance_id"] = instance_id
    if contact_id is not None:
        input_["contact_id"] = contact_id
    if processor_arn is not None:
        input_["processor_arn"] = processor_arn
    if failure_mode is not None:
        input_["failure_mode"] = failure_mode

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output