Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Initiates a connection to a target (for example, a managed node) for a Session Manager session. Returns a URL and token that can be used to open a WebSocket connection for sending input and receiving outputs.
Amazon Web Services CLI usage: start-session
is an interactive command
that requires the Session Manager plugin to be installed on the client
machine making the call. For information, see
Install the Session Manager plugin for the Amazon Web Services CLI
in the Amazon Web Services Systems Manager User Guide.
Amazon Web Services Tools for PowerShell usage: Start-SSMSession isn't currently supported by Amazon Web Services Tools for PowerShell on Windows local machines.
Synopsis
- data StartSession = StartSession' {}
- newStartSession :: Text -> StartSession
- startSession_documentName :: Lens' StartSession (Maybe Text)
- startSession_parameters :: Lens' StartSession (Maybe (HashMap Text [Text]))
- startSession_reason :: Lens' StartSession (Maybe Text)
- startSession_target :: Lens' StartSession Text
- data StartSessionResponse = StartSessionResponse' {}
- newStartSessionResponse :: Int -> StartSessionResponse
- startSessionResponse_sessionId :: Lens' StartSessionResponse (Maybe Text)
- startSessionResponse_streamUrl :: Lens' StartSessionResponse (Maybe Text)
- startSessionResponse_tokenValue :: Lens' StartSessionResponse (Maybe Text)
- startSessionResponse_httpStatus :: Lens' StartSessionResponse Int
Creating a Request
data StartSession Source #
See: newStartSession
smart constructor.
StartSession' | |
|
Instances
Create a value of StartSession
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
StartSession
, startSession_documentName
- The name of the SSM document you want to use to define the type of
session, input parameters, or preferences for the session. For example,
SSM-SessionManagerRunShell
. You can call the GetDocument API to verify
the document exists before attempting to start a session. If no document
name is provided, a shell to the managed node is launched by default.
For more information, see
Start a session
in the Amazon Web Services Systems Manager User Guide.
StartSession
, startSession_parameters
- The values you want to specify for the parameters defined in the Session
document.
StartSession
, startSession_reason
- The reason for connecting to the instance. This value is included in the
details for the Amazon CloudWatch Events event created when you start
the session.
StartSession
, startSession_target
- The managed node to connect to for the session.
Request Lenses
startSession_documentName :: Lens' StartSession (Maybe Text) Source #
The name of the SSM document you want to use to define the type of
session, input parameters, or preferences for the session. For example,
SSM-SessionManagerRunShell
. You can call the GetDocument API to verify
the document exists before attempting to start a session. If no document
name is provided, a shell to the managed node is launched by default.
For more information, see
Start a session
in the Amazon Web Services Systems Manager User Guide.
startSession_parameters :: Lens' StartSession (Maybe (HashMap Text [Text])) Source #
The values you want to specify for the parameters defined in the Session document.
startSession_reason :: Lens' StartSession (Maybe Text) Source #
The reason for connecting to the instance. This value is included in the details for the Amazon CloudWatch Events event created when you start the session.
startSession_target :: Lens' StartSession Text Source #
The managed node to connect to for the session.
Destructuring the Response
data StartSessionResponse Source #
See: newStartSessionResponse
smart constructor.
StartSessionResponse' | |
|
Instances
newStartSessionResponse Source #
Create a value of StartSessionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
StartSessionResponse
, startSessionResponse_sessionId
- The ID of the session.
$sel:streamUrl:StartSessionResponse'
, startSessionResponse_streamUrl
- A URL back to SSM Agent on the managed node that the Session Manager
client uses to send commands and receive output from the node. Format:
wss://ssmmessages.
region
.amazonaws.com/v1/data-channel/
session-id
?stream=(input|output)
region represents the Region identifier for an Amazon Web Services
Region supported by Amazon Web Services Systems Manager, such as
us-east-2
for the US East (Ohio) Region. For a list of supported
region values, see the Region column in
Systems Manager service endpoints
in the Amazon Web Services General Reference.
session-id represents the ID of a Session Manager session, such as
1a2b3c4dEXAMPLE
.
$sel:tokenValue:StartSessionResponse'
, startSessionResponse_tokenValue
- An encrypted token value containing session and caller information. This
token is used to authenticate the connection to the managed node, and is
valid only long enough to ensure the connection is successful. Never
share your session's token.
$sel:httpStatus:StartSessionResponse'
, startSessionResponse_httpStatus
- The response's http status code.
Response Lenses
startSessionResponse_sessionId :: Lens' StartSessionResponse (Maybe Text) Source #
The ID of the session.
startSessionResponse_streamUrl :: Lens' StartSessionResponse (Maybe Text) Source #
A URL back to SSM Agent on the managed node that the Session Manager
client uses to send commands and receive output from the node. Format:
wss://ssmmessages.
region
.amazonaws.com/v1/data-channel/
session-id
?stream=(input|output)
region represents the Region identifier for an Amazon Web Services
Region supported by Amazon Web Services Systems Manager, such as
us-east-2
for the US East (Ohio) Region. For a list of supported
region values, see the Region column in
Systems Manager service endpoints
in the Amazon Web Services General Reference.
session-id represents the ID of a Session Manager session, such as
1a2b3c4dEXAMPLE
.
startSessionResponse_tokenValue :: Lens' StartSessionResponse (Maybe Text) Source #
An encrypted token value containing session and caller information. This token is used to authenticate the connection to the managed node, and is valid only long enough to ensure the connection is successful. Never share your session's token.
startSessionResponse_httpStatus :: Lens' StartSessionResponse Int Source #
The response's http status code.