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/ivs_real_time.py
| def revoke_connection_token(
self,
token_id: "capo_ivs_realtime.types.connection_token_id.ConnectionTokenId",
*,
config_overrides: Optional[IVSRealTimeClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_ivs_realtime.types.revoke_connection_token_request.RevokeConnectionTokenRequest]",
) -> OperationResponse[
"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 = (
capo_ivs_realtime._operations.amazon_interactive_video_service_real_time.revoke_connection_token.revoke_connection_token(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|