Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Initiates a connection to a target (for example, an instance) 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' {
- documentName :: Maybe Text
- parameters :: Maybe (HashMap Text [Text])
- target :: Text
- newStartSession :: Text -> StartSession
- startSession_documentName :: Lens' StartSession (Maybe Text)
- startSession_parameters :: Lens' StartSession (Maybe (HashMap Text [Text]))
- startSession_target :: Lens' StartSession Text
- data StartSessionResponse = StartSessionResponse' {}
- newStartSessionResponse :: Int -> StartSessionResponse
- startSessionResponse_streamUrl :: Lens' StartSessionResponse (Maybe Text)
- startSessionResponse_tokenValue :: Lens' StartSessionResponse (Maybe Text)
- startSessionResponse_sessionId :: 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:
$sel:documentName:StartSession'
, startSession_documentName
- The name of the SSM document to define the parameters and plugin
settings 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 instance is launched by default.
$sel:parameters:StartSession'
, startSession_parameters
- Reserved for future use.
$sel:target:StartSession'
, startSession_target
- The instance to connect to for the session.
Request Lenses
startSession_documentName :: Lens' StartSession (Maybe Text) Source #
The name of the SSM document to define the parameters and plugin
settings 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 instance is launched by default.
startSession_parameters :: Lens' StartSession (Maybe (HashMap Text [Text])) Source #
Reserved for future use.
startSession_target :: Lens' StartSession Text Source #
The instance 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:
$sel:streamUrl:StartSessionResponse'
, startSessionResponse_streamUrl
- A URL back to SSM Agent on the instance that the Session Manager client
uses to send commands and receive output from the instance. 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. Used
to authenticate the connection to the instance.
$sel:sessionId:StartSessionResponse'
, startSessionResponse_sessionId
- The ID of the session.
$sel:httpStatus:StartSessionResponse'
, startSessionResponse_httpStatus
- The response's http status code.
Response Lenses
startSessionResponse_streamUrl :: Lens' StartSessionResponse (Maybe Text) Source #
A URL back to SSM Agent on the instance that the Session Manager client
uses to send commands and receive output from the instance. 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. Used to authenticate the connection to the instance.
startSessionResponse_sessionId :: Lens' StartSessionResponse (Maybe Text) Source #
The ID of the session.
startSessionResponse_httpStatus :: Lens' StartSessionResponse Int Source #
The response's http status code.