Skip to content

revoke_connection_token async

revoke_connection_token(
    token_id: ConnectionTokenId,
    *,
    config_overrides: Optional[AsyncIVSRealTimeClientConfig] = None,
) -> RevokeConnectionTokenResponse

Revokes the specified connection token so that it can no longer connect to a stage. This operation disconnects any participant currently connected with the revoked token.

Parameters:

Raises:

Source code in docs_src/capo_ivs_realtime/_services/async_ivs_real_time.py
async def revoke_connection_token(
    self,
    token_id: "capo_ivs_realtime.types.connection_token_id.ConnectionTokenId",
    *,
    config_overrides: Optional[AsyncIVSRealTimeClientConfig] = None,
) -> "capo_ivs_realtime.types.revoke_connection_token_response.RevokeConnectionTokenResponse":
    """<p>Revokes the specified connection token so that it can no longer connect to a stage. This operation disconnects any participant currently connected with the revoked token.</p>

    Args:
        token_id: <p>The ID of the connection token to revoke.</p>

    Raises:
        capo_ivs_realtime.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_ivs_realtime.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_ivs_realtime.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ivs_realtime.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ivs_realtime.types.revoke_connection_token_request.RevokeConnectionTokenRequest]",
    ) -> AsyncOperationResponse[
        "capo_ivs_realtime.types.revoke_connection_token_response.RevokeConnectionTokenResponse"
    ]:
        import capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.revoke_connection_token

        (
            output,
            http_response,
        ) = await capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.revoke_connection_token.async_revoke_connection_token(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RevokeConnectionToken")
    )
    input_: capo_ivs_realtime.types.revoke_connection_token_request.RevokeConnectionTokenRequest = {
        "token_id": token_id
    }

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