Skip to content

resume_session async

resume_session(
    session_id: SessionId, *, config_overrides: Optional[AsyncSSMClientConfig] = None
) -> ResumeSessionResponse

Reconnects a session to a managed node after it has been disconnected. Connections can be resumed for disconnected sessions, but not terminated sessions.

This command is primarily for use by client machines to automatically reconnect during intermittent network issues. It isn't intended for any other use.

Parameters:

  • session_id (SessionId) –

    The ID of the disconnected session to resume.

Raises:

  • DoesNotExistException –

    Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.

    For information about resource quotas in Amazon Web Services Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.

  • InternalServerError –

    An error occurred on the server side.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ssm/_services/async_ssm.py
async def resume_session(
    self,
    session_id: "capo_ssm.types.session_id.SessionId",
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
) -> "capo_ssm.types.resume_session_response.ResumeSessionResponse":
    """<p>Reconnects a session to a managed node after it has been disconnected. Connections can be resumed for disconnected sessions, but not terminated sessions.</p> <note> <p>This command is primarily for use by client machines to automatically reconnect during intermittent network issues. It isn't intended for any other use.</p> </note>

    Args:
        session_id: <p>The ID of the disconnected session to resume.</p>

    Raises:
        capo_ssm.errors.does_not_exist_exception.DoesNotExistException: <p>Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.</p> <p>For information about resource quotas in Amazon Web Services Systems Manager, see <a href="https://docs.aws.amazon.com/general/latest/gr/ssm.html#limits_ssm">Systems Manager service quotas</a> in the <i>Amazon Web Services General Reference</i>.</p>
        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.resume_session_request.ResumeSessionRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.resume_session_response.ResumeSessionResponse"
    ]:
        import capo_ssm._operations.amazon_ssm.resume_session

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ResumeSession")
    )
    input_: capo_ssm.types.resume_session_request.ResumeSessionRequest = {
        "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