Connect / Client / stop_contact

stop_contact#

Connect.Client.stop_contact(**kwargs)#

Ends the specified contact. Use this API to stop queued callbacks. It does not work for voice contacts that use the following initiation methods:

  • DISCONNECT

  • TRANSFER

  • QUEUE_TRANSFER

Chat and task contacts can be terminated in any state, regardless of initiation method.

See also: AWS API Documentation

Request Syntax

response = client.stop_contact(
    ContactId='string',
    InstanceId='string',
    DisconnectReason={
        'Code': 'string'
    }
)
Parameters:
  • ContactId (string) –

    [REQUIRED]

    The ID of the contact.

  • InstanceId (string) –

    [REQUIRED]

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

  • DisconnectReason (dict) –

    The reason a contact can be disconnected. Only Amazon Connect outbound campaigns can provide this field.

    • Code (string) –

      A code that indicates how the contact was terminated.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • Connect.Client.exceptions.InvalidRequestException

  • Connect.Client.exceptions.ContactNotFoundException

  • Connect.Client.exceptions.InvalidParameterException

  • Connect.Client.exceptions.ResourceNotFoundException

  • Connect.Client.exceptions.InternalServiceException