Stops a telemetry query session. Terminates the specified session. After a session is stopped it cannot be reused.
Parameters:
-
session_id
(str)
–
The unique ID of the session.
Raises:
Examples:
Stop a telemetry query session
The following example terminates the specified session. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> client.stop_telemetry_query_session(session_id='9f8c7d6e-5b4a-4c3d-9e2f-1a0b2c3d4e5f')
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
| def stop_telemetry_query_session(
self,
session_id: str,
*,
config_overrides: Optional[CloudWatchOmniClientConfig] = None,
) -> "capo_cloudwatchomni.types.stop_telemetry_query_session_response.StopTelemetryQuerySessionResponse":
"""Stops a telemetry query session. Terminates the specified session. After a session is stopped it cannot be reused.
Args:
session_id: The unique ID of the session.
Raises:
capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
capo_cloudwatchomni.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist.
capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Stop a telemetry query session
The following example terminates the specified session. Payloads are shown as JSON; on the wire they are CBOR-encoded.
>>> client.stop_telemetry_query_session(session_id='9f8c7d6e-5b4a-4c3d-9e2f-1a0b2c3d4e5f')
"""
def _handler(
req: "OperationRequest[capo_cloudwatchomni.types.stop_telemetry_query_session_request.StopTelemetryQuerySessionRequest]",
) -> OperationResponse[
"capo_cloudwatchomni.types.stop_telemetry_query_session_response.StopTelemetryQuerySessionResponse"
]:
import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.stop_telemetry_query_session
output, http_response = (
capo_cloudwatchomni._operations.cloud_watch_omni_frontend.stop_telemetry_query_session.stop_telemetry_query_session(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopTelemetryQuerySession")
)
input_: capo_cloudwatchomni.types.stop_telemetry_query_session_request.StopTelemetryQuerySessionRequest = {
"session_id": session_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|