Skip to content

stop_telemetry_query_session async

stop_telemetry_query_session(
    session_id: str,
    *,
    config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = None,
) -> StopTelemetryQuerySessionResponse

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.

>>> await client.stop_telemetry_query_session(session_id='9f8c7d6e-5b4a-4c3d-9e2f-1a0b2c3d4e5f')
Source code in docs_src/capo_cloudwatchomni/_services/async_cloud_watch_omni.py
async def stop_telemetry_query_session(
    self,
    session_id: str,
    *,
    config_overrides: Optional[AsyncCloudWatchOmniClientConfig] = 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.

        >>> await client.stop_telemetry_query_session(session_id='9f8c7d6e-5b4a-4c3d-9e2f-1a0b2c3d4e5f')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatchomni.types.stop_telemetry_query_session_request.StopTelemetryQuerySessionRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatchomni.types.stop_telemetry_query_session_response.StopTelemetryQuerySessionResponse"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.stop_telemetry_query_session

        (
            output,
            http_response,
        ) = await capo_cloudwatchomni._operations.cloud_watch_omni_frontend.stop_telemetry_query_session.async_stop_telemetry_query_session(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output