Disconnects a participant.
For security recommendations, see Connect Customer Chat security best practices.
ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Parameters:
-
client_token
(Optional[ClientToken], default:
None
)
–
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
-
connection_token
(ParticipantToken)
–
The authentication token associated with the participant's connection.
Raises:
Source code in docs_src/capo_connectparticipant/_services/connect_participant.py
| def disconnect_participant(
self,
connection_token: "capo_connectparticipant.types.participant_token.ParticipantToken",
*,
config_overrides: Optional[ConnectParticipantClientConfig] = None,
client_token: Optional[
"capo_connectparticipant.types.client_token.ClientToken"
] = None,
) -> "capo_connectparticipant.types.disconnect_participant_response.DisconnectParticipantResponse":
"""<p>Disconnects a participant. </p> <p>For security recommendations, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat">Connect Customer Chat security best practices</a>. </p> <note> <p> <code>ConnectionToken</code> is used for invoking this API instead of <code>ParticipantToken</code>.</p> </note> <p>The Amazon Connect Participant Service APIs do not use <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4 authentication</a>.</p>
Args:
client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
connection_token: <p>The authentication token associated with the participant's connection.</p>
Raises:
capo_connectparticipant.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_connectparticipant.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Amazon Connect service.</p>
capo_connectparticipant.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_connectparticipant.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by Amazon Connect.</p>
capo_connectparticipant.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_connectparticipant.types.disconnect_participant_request.DisconnectParticipantRequest]",
) -> OperationResponse[
"capo_connectparticipant.types.disconnect_participant_response.DisconnectParticipantResponse"
]:
import capo_connectparticipant._operations.amazon_connect_participant_service_lambda.disconnect_participant
output, http_response = (
capo_connectparticipant._operations.amazon_connect_participant_service_lambda.disconnect_participant.disconnect_participant(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisconnectParticipant")
)
input_: capo_connectparticipant.types.disconnect_participant_request.DisconnectParticipantRequest = {
"connection_token": connection_token
}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|