Delete the connection with the provided id.
Raises:
-
ForbiddenException
–
The caller is not authorized to invoke this operation.
-
GoneException
–
The connection with the provided id no longer exists.
-
LimitExceededException
–
The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_apigatewaymanagementapi/_services/async_api_gateway_management_api.py
| async def delete_connection(
self,
connection_id: "capo_apigatewaymanagementapi.types.__string.__string",
*,
config_overrides: Optional[AsyncApiGatewayManagementApiClientConfig] = None,
) -> None:
"""<p>Delete the connection with the provided id.</p>
Raises:
capo_apigatewaymanagementapi.errors.forbidden_exception.ForbiddenException: <p>The caller is not authorized to invoke this operation.</p>
capo_apigatewaymanagementapi.errors.gone_exception.GoneException: <p>The connection with the provided id no longer exists.</p>
capo_apigatewaymanagementapi.errors.limit_exceeded_exception.LimitExceededException: <p>The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full.</p>
capo_apigatewaymanagementapi.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_apigatewaymanagementapi.types.delete_connection_request.DeleteConnectionRequest]",
) -> AsyncOperationResponse[None]:
import capo_apigatewaymanagementapi._operations.api_gateway_management_api.delete_connection
(
output,
http_response,
) = await capo_apigatewaymanagementapi._operations.api_gateway_management_api.delete_connection.async_delete_connection(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteConnection")
)
input_: capo_apigatewaymanagementapi.types.delete_connection_request.DeleteConnectionRequest = {
"connection_id": connection_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|