Get information about 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/api_gateway_management_api.py
| def get_connection(
self,
connection_id: "capo_apigatewaymanagementapi.types.__string.__string",
*,
config_overrides: Optional[ApiGatewayManagementApiClientConfig] = None,
) -> "capo_apigatewaymanagementapi.types.get_connection_response.GetConnectionResponse":
"""<p>Get information about 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.
"""
def _handler(
req: "OperationRequest[capo_apigatewaymanagementapi.types.get_connection_request.GetConnectionRequest]",
) -> OperationResponse[
"capo_apigatewaymanagementapi.types.get_connection_response.GetConnectionResponse"
]:
import capo_apigatewaymanagementapi._operations.api_gateway_management_api.get_connection
output, http_response = (
capo_apigatewaymanagementapi._operations.api_gateway_management_api.get_connection.get_connection(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetConnection")
)
input_: capo_apigatewaymanagementapi.types.get_connection_request.GetConnectionRequest = {
"connection_id": connection_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|