Skip to content

cancel_participant_authentication async

cancel_participant_authentication(
    session_id: SessionId,
    connection_token: ParticipantToken,
    *,
    config_overrides: Optional[AsyncConnectParticipantClientConfig] = None,
) -> CancelParticipantAuthenticationResponse

Cancels the authentication session. The opted out branch of the Authenticate Customer flow block will be taken.

The current supported channel is chat. This API is not supported for Apple Messages for Business, WhatsApp, or SMS chats.

ConnectionToken is used for invoking this API instead of ParticipantToken.

The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.

Parameters:

  • session_id (SessionId) –

    The sessionId provided in the authenticationInitiated event.

  • connection_token (ParticipantToken) –

    The authentication token associated with the participant's connection.

Raises:

Source code in docs_src/capo_connectparticipant/_services/async_connect_participant.py
async def cancel_participant_authentication(
    self,
    session_id: "capo_connectparticipant.types.session_id.SessionId",
    connection_token: "capo_connectparticipant.types.participant_token.ParticipantToken",
    *,
    config_overrides: Optional[AsyncConnectParticipantClientConfig] = None,
) -> "capo_connectparticipant.types.cancel_participant_authentication_response.CancelParticipantAuthenticationResponse":
    """<p>Cancels the authentication session. The opted out branch of the Authenticate Customer flow block will be taken.</p> <note> <p>The current supported channel is chat. This API is not supported for Apple Messages for Business, WhatsApp, or SMS chats.</p> </note> <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:
        session_id: <p>The <code>sessionId</code> provided in the <code>authenticationInitiated</code> event.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connectparticipant.types.cancel_participant_authentication_request.CancelParticipantAuthenticationRequest]",
    ) -> AsyncOperationResponse[
        "capo_connectparticipant.types.cancel_participant_authentication_response.CancelParticipantAuthenticationResponse"
    ]:
        import capo_connectparticipant._operations.amazon_connect_participant_service_lambda.cancel_participant_authentication

        (
            output,
            http_response,
        ) = await capo_connectparticipant._operations.amazon_connect_participant_service_lambda.cancel_participant_authentication.async_cancel_participant_authentication(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CancelParticipantAuthentication")
    )
    input_: capo_connectparticipant.types.cancel_participant_authentication_request.CancelParticipantAuthenticationRequest = {
        "session_id": session_id,
        "connection_token": connection_token,
    }

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