Struct aws_sdk_ssm::client::fluent_builders::StartSession
source · [−]pub struct StartSession { /* private fields */ }
Expand description
Fluent builder constructing a request to StartSession
.
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.
Implementations
sourceimpl StartSession
impl StartSession
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<StartSession, AwsResponseRetryClassifier>, SdkError<StartSessionError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<StartSession, AwsResponseRetryClassifier>, SdkError<StartSessionError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<StartSessionOutput, SdkError<StartSessionError>>
pub async fn send(
self
) -> Result<StartSessionOutput, SdkError<StartSessionError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn target(self, input: impl Into<String>) -> Self
pub fn target(self, input: impl Into<String>) -> Self
The managed node to connect to for the session.
sourcepub fn set_target(self, input: Option<String>) -> Self
pub fn set_target(self, input: Option<String>) -> Self
The managed node to connect to for the session.
sourcepub fn document_name(self, input: impl Into<String>) -> Self
pub fn document_name(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_document_name(self, input: Option<String>) -> Self
pub fn set_document_name(self, input: Option<String>) -> Self
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.
sourcepub fn reason(self, input: impl Into<String>) -> Self
pub fn reason(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_reason(self, input: Option<String>) -> Self
pub fn set_reason(self, input: Option<String>) -> Self
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.
sourcepub fn parameters(self, k: impl Into<String>, v: Vec<String>) -> Self
pub fn parameters(self, k: impl Into<String>, v: Vec<String>) -> Self
Adds a key-value pair to Parameters
.
To override the contents of this collection use set_parameters
.
The values you want to specify for the parameters defined in the Session document.
Trait Implementations
sourceimpl Clone for StartSession
impl Clone for StartSession
sourcefn clone(&self) -> StartSession
fn clone(&self) -> StartSession
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more