Skip to content

suspend_contact_recording async

suspend_contact_recording(
    instance_id: InstanceId,
    contact_id: ContactId,
    initial_contact_id: ContactId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    contact_recording_type: Optional[ContactRecordingType] = None,
) -> SuspendContactRecordingResponse

When a contact is being recorded, this API suspends recording whatever is selected in the flow configuration: call (IVR or agent), screen, or both. If only call recording or only screen recording is enabled, then it would be suspended. For example, you might suspend the screen recording while collecting sensitive information, such as a credit card number. Then use ResumeContactRecording to restart recording the screen.

The period of time that the recording is suspended is filled with silence in the final recording.

Voice (IVR, agent) and screen recordings are supported.

Parameters:

  • instance_id (InstanceId) –

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

  • contact_id (ContactId) –

    The identifier of the contact.

  • initial_contact_id (ContactId) –

    The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.

  • contact_recording_type (Optional[ContactRecordingType], default: None ) –

    The type of recording being operated on.

Raises:

  • InternalServiceException –

    Request processing failed because of an error or failure with the service.

  • InvalidActiveRegionException –

    This exception occurs when an API request is made to a non-active region in an Amazon Connect instance configured with Amazon Connect Global Resiliency. For example, if the active region is US West (Oregon) and a request is made to US East (N. Virginia), the exception will be returned.

  • InvalidRequestException –

    The request is not valid.

  • ResourceNotFoundException –

    The specified resource was not found.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_connect/_services/async_connect.py
async def suspend_contact_recording(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    contact_id: "capo_connect.types.contact_id.ContactId",
    initial_contact_id: "capo_connect.types.contact_id.ContactId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    contact_recording_type: Optional[
        "capo_connect.types.contact_recording_type.ContactRecordingType"
    ] = None,
) -> "capo_connect.types.suspend_contact_recording_response.SuspendContactRecordingResponse":
    """<p>When a contact is being recorded, this API suspends recording whatever is selected in the flow configuration: call (IVR or agent), screen, or both. If only call recording or only screen recording is enabled, then it would be suspended. For example, you might suspend the screen recording while collecting sensitive information, such as a credit card number. Then use <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_ResumeContactRecording.html">ResumeContactRecording</a> to restart recording the screen.</p> <p>The period of time that the recording is suspended is filled with silence in the final recording. </p> <p> Voice (IVR, agent) and screen recordings are supported.</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>
        initial_contact_id: <p>The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.</p>
        contact_recording_type: <p>The type of recording being operated on.</p>

    Raises:
        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_active_region_exception.InvalidActiveRegionException: <p>This exception occurs when an API request is made to a non-active region in an Amazon Connect instance configured with Amazon Connect Global Resiliency. For example, if the active region is US West (Oregon) and a request is made to US East (N. Virginia), the exception will be returned.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.suspend_contact_recording_request.SuspendContactRecordingRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.suspend_contact_recording_response.SuspendContactRecordingResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.suspend_contact_recording

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.suspend_contact_recording.async_suspend_contact_recording(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SuspendContactRecording")
    )
    input_: capo_connect.types.suspend_contact_recording_request.SuspendContactRecordingRequest = {
        "instance_id": instance_id,
        "contact_id": contact_id,
        "initial_contact_id": initial_contact_id,
    }
    if contact_recording_type is not None:
        input_["contact_recording_type"] = contact_recording_type

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output