libZSservicesZSamazonka-ssmZSamazonka-ssm
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.SSM.StartSession

Description

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

Creating a Request

data StartSession Source #

See: newStartSession smart constructor.

Constructors

StartSession' 

Fields

  • documentName :: Maybe Text

    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.

  • parameters :: Maybe (HashMap Text [Text])

    Reserved for future use.

  • target :: Text

    The instance to connect to for the session.

Instances

Instances details
Eq StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Read StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Show StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Generic StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Associated Types

type Rep StartSession :: Type -> Type #

NFData StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Methods

rnf :: StartSession -> () #

Hashable StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

ToJSON StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

AWSRequest StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Associated Types

type AWSResponse StartSession #

ToHeaders StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

ToPath StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

ToQuery StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

type Rep StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

type Rep StartSession = D1 ('MetaData "StartSession" "Amazonka.SSM.StartSession" "libZSservicesZSamazonka-ssmZSamazonka-ssm" 'False) (C1 ('MetaCons "StartSession'" 'PrefixI 'True) (S1 ('MetaSel ('Just "documentName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "parameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text [Text]))) :*: S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse StartSession Source # 
Instance details

Defined in Amazonka.SSM.StartSession

newStartSession Source #

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_target :: Lens' StartSession Text Source #

The instance to connect to for the session.

Destructuring the Response

data StartSessionResponse Source #

See: newStartSessionResponse smart constructor.

Constructors

StartSessionResponse' 

Fields

  • streamUrl :: Maybe Text

    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.

  • tokenValue :: Maybe Text

    An encrypted token value containing session and caller information. Used to authenticate the connection to the instance.

  • sessionId :: Maybe Text

    The ID of the session.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq StartSessionResponse Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Read StartSessionResponse Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Show StartSessionResponse Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Generic StartSessionResponse Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Associated Types

type Rep StartSessionResponse :: Type -> Type #

NFData StartSessionResponse Source # 
Instance details

Defined in Amazonka.SSM.StartSession

Methods

rnf :: StartSessionResponse -> () #

type Rep StartSessionResponse Source # 
Instance details

Defined in Amazonka.SSM.StartSession

type Rep StartSessionResponse = D1 ('MetaData "StartSessionResponse" "Amazonka.SSM.StartSession" "libZSservicesZSamazonka-ssmZSamazonka-ssm" 'False) (C1 ('MetaCons "StartSessionResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "streamUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tokenValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "sessionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.