/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace SSM { namespace Model { /** */ class StartSessionRequest : public SSMRequest { public: AWS_SSM_API StartSessionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "StartSession"; } AWS_SSM_API Aws::String SerializePayload() const override; AWS_SSM_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The managed node to connect to for the session.

*/ inline const Aws::String& GetTarget() const{ return m_target; } /** *

The managed node to connect to for the session.

*/ inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } /** *

The managed node to connect to for the session.

*/ inline void SetTarget(const Aws::String& value) { m_targetHasBeenSet = true; m_target = value; } /** *

The managed node to connect to for the session.

*/ inline void SetTarget(Aws::String&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } /** *

The managed node to connect to for the session.

*/ inline void SetTarget(const char* value) { m_targetHasBeenSet = true; m_target.assign(value); } /** *

The managed node to connect to for the session.

*/ inline StartSessionRequest& WithTarget(const Aws::String& value) { SetTarget(value); return *this;} /** *

The managed node to connect to for the session.

*/ inline StartSessionRequest& WithTarget(Aws::String&& value) { SetTarget(std::move(value)); return *this;} /** *

The managed node to connect to for the session.

*/ inline StartSessionRequest& WithTarget(const char* value) { SetTarget(value); return *this;} /** *

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.

*/ inline const Aws::String& GetDocumentName() const{ return m_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.

*/ inline bool DocumentNameHasBeenSet() const { return m_documentNameHasBeenSet; } /** *

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.

*/ inline void SetDocumentName(const Aws::String& value) { m_documentNameHasBeenSet = true; m_documentName = value; } /** *

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.

*/ inline void SetDocumentName(Aws::String&& value) { m_documentNameHasBeenSet = true; m_documentName = std::move(value); } /** *

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.

*/ inline void SetDocumentName(const char* value) { m_documentNameHasBeenSet = true; m_documentName.assign(value); } /** *

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.

*/ inline StartSessionRequest& WithDocumentName(const Aws::String& value) { SetDocumentName(value); return *this;} /** *

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.

*/ inline StartSessionRequest& WithDocumentName(Aws::String&& value) { SetDocumentName(std::move(value)); return *this;} /** *

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.

*/ inline StartSessionRequest& WithDocumentName(const char* value) { SetDocumentName(value); return *this;} /** *

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.

*/ inline const Aws::String& GetReason() const{ return m_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.

*/ inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } /** *

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.

*/ inline void SetReason(const Aws::String& value) { m_reasonHasBeenSet = true; m_reason = value; } /** *

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.

*/ inline void SetReason(Aws::String&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } /** *

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.

*/ inline void SetReason(const char* value) { m_reasonHasBeenSet = true; m_reason.assign(value); } /** *

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.

*/ inline StartSessionRequest& WithReason(const Aws::String& value) { SetReason(value); return *this;} /** *

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.

*/ inline StartSessionRequest& WithReason(Aws::String&& value) { SetReason(std::move(value)); return *this;} /** *

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.

*/ inline StartSessionRequest& WithReason(const char* value) { SetReason(value); return *this;} /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline const Aws::Map>& GetParameters() const{ return m_parameters; } /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline void SetParameters(const Aws::Map>& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline void SetParameters(Aws::Map>&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline StartSessionRequest& WithParameters(const Aws::Map>& value) { SetParameters(value); return *this;} /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline StartSessionRequest& WithParameters(Aws::Map>&& value) { SetParameters(std::move(value)); return *this;} /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline StartSessionRequest& AddParameters(const Aws::String& key, const Aws::Vector& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline StartSessionRequest& AddParameters(Aws::String&& key, const Aws::Vector& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline StartSessionRequest& AddParameters(const Aws::String& key, Aws::Vector&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline StartSessionRequest& AddParameters(Aws::String&& key, Aws::Vector&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), std::move(value)); return *this; } /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline StartSessionRequest& AddParameters(const char* key, Aws::Vector&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

The values you want to specify for the parameters defined in the Session * document.

*/ inline StartSessionRequest& AddParameters(const char* key, const Aws::Vector& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } private: Aws::String m_target; bool m_targetHasBeenSet = false; Aws::String m_documentName; bool m_documentNameHasBeenSet = false; Aws::String m_reason; bool m_reasonHasBeenSet = false; Aws::Map> m_parameters; bool m_parametersHasBeenSet = false; }; } // namespace Model } // namespace SSM } // namespace Aws