Skip to content

get_connection_status async

get_connection_status(
    target: SessionTarget, *, config_overrides: Optional[AsyncSSMClientConfig] = None
) -> GetConnectionStatusResponse

Retrieves the Session Manager connection status for a managed node to determine whether it is running and ready to receive Session Manager connections.

Parameters:

Raises:

Source code in docs_src/capo_ssm/_services/async_ssm.py
async def get_connection_status(
    self,
    target: "capo_ssm.types.session_target.SessionTarget",
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
) -> "capo_ssm.types.get_connection_status_response.GetConnectionStatusResponse":
    """<p>Retrieves the Session Manager connection status for a managed node to determine whether it is running and ready to receive Session Manager connections.</p>

    Args:
        target: <p>The managed node ID.</p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm.types.get_connection_status_request.GetConnectionStatusRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.get_connection_status_response.GetConnectionStatusResponse"
    ]:
        import capo_ssm._operations.amazon_ssm.get_connection_status

        (
            output,
            http_response,
        ) = await capo_ssm._operations.amazon_ssm.get_connection_status.async_get_connection_status(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetConnectionStatus")
    )
    input_: capo_ssm.types.get_connection_status_request.GetConnectionStatusRequest = {
        "target": target
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output