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:
Source code in docs_src/capo_ssm/_services/ssm.py
| def resume_session(
self,
session_id: "capo_ssm.types.session_id.SessionId",
*,
config_overrides: Optional[SSMClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_ssm.types.resume_session_request.ResumeSessionRequest]",
) -> OperationResponse[
"capo_ssm.types.resume_session_response.ResumeSessionResponse"
]:
import capo_ssm._operations.amazon_ssm.resume_session
output, http_response = (
capo_ssm._operations.amazon_ssm.resume_session.resume_session(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|