Skip to content

update_participant_authentication

update_participant_authentication(
    state: ParticipantToken,
    instance_id: InstanceId,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    code: Optional[AuthorizationCode] = None,
    error: Optional[AuthenticationError] = None,
    error_description: Optional[AuthenticationErrorDescription] = None,
) -> UpdateParticipantAuthenticationResponse

Instructs Connect Customer to resume the authentication process. The subsequent actions depend on the request body contents:

  • If a code is provided: Connect retrieves the identity information from Amazon Cognito and imports it into Connect Customer Profiles.

  • If an error is provided: The error branch of the Authenticate Customer block is executed.

The API returns a success response to acknowledge the request. However, the interaction and exchange of identity information occur asynchronously after the response is returned.

Parameters:

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def update_participant_authentication(
    self,
    state: "capo_connect.types.participant_token.ParticipantToken",
    instance_id: "capo_connect.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    code: Optional[
        "capo_connect.types.authorization_code.AuthorizationCode"
    ] = None,
    error: Optional[
        "capo_connect.types.authentication_error.AuthenticationError"
    ] = None,
    error_description: Optional[
        "capo_connect.types.authentication_error_description.AuthenticationErrorDescription"
    ] = None,
) -> "capo_connect.types.update_participant_authentication_response.UpdateParticipantAuthenticationResponse":
    """<p>Instructs Connect Customer to resume the authentication process. The subsequent actions depend on the request body contents:</p> <ul> <li> <p> <b>If a code is provided</b>: Connect retrieves the identity information from Amazon Cognito and imports it into Connect Customer Profiles.</p> </li> <li> <p> <b>If an error is provided</b>: The error branch of the Authenticate Customer block is executed.</p> </li> </ul> <note> <p>The API returns a success response to acknowledge the request. However, the interaction and exchange of identity information occur asynchronously after the response is returned.</p> </note>

    Args:
        state: <p>The <code>state</code> query parameter that was provided by Cognito in the <code>redirectUri</code>. This will also match the <code>state</code> parameter provided in the <code>AuthenticationUrl</code> from the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_GetAuthenticationUrl.html">GetAuthenticationUrl</a> response.</p>
        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>
        code: <p>The <code>code</code> query parameter provided by Cognito in the <code>redirectUri</code>.</p>
        error: <p>The <code>error</code> query parameter provided by Cognito in the <code>redirectUri</code>.</p>
        error_description: <p>The <code>error_description</code> parameter provided by Cognito in the <code>redirectUri</code>.</p>

    Raises:
        capo_connect.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_connect.errors.conflict_exception.ConflictException: <p>Operation cannot be performed at this time as there is a conflict with another operation or contact state.</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.throttling_exception.ThrottlingException: <p>The throttling limit 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.update_participant_authentication_request.UpdateParticipantAuthenticationRequest]",
    ) -> OperationResponse[
        "capo_connect.types.update_participant_authentication_response.UpdateParticipantAuthenticationResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.update_participant_authentication

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

    def _redact_input(
        input_: "capo_connect.types.update_participant_authentication_request.UpdateParticipantAuthenticationRequest",
    ) -> dict[str, Any]:
        import capo_connect.types.update_participant_authentication_request

        return capo_connect.types.update_participant_authentication_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateParticipantAuthentication", redact_input=_redact_input
        ),
    )
    input_: capo_connect.types.update_participant_authentication_request.UpdateParticipantAuthenticationRequest = {
        "state": state,
        "instance_id": instance_id,
    }
    if code is not None:
        input_["code"] = code
    if error is not None:
        input_["error"] = error
    if error_description is not None:
        input_["error_description"] = error_description

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