pub struct StartSessionFluentBuilder { /* 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§
source§impl StartSessionFluentBuilder
impl StartSessionFluentBuilder
sourcepub fn as_input(&self) -> &StartSessionInputBuilder
pub fn as_input(&self) -> &StartSessionInputBuilder
Access the StartSession as a reference.
sourcepub async fn send(
self
) -> Result<StartSessionOutput, SdkError<StartSessionError, HttpResponse>>
pub async fn send( self ) -> Result<StartSessionOutput, SdkError<StartSessionError, HttpResponse>>
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 customize(
self
) -> CustomizableOperation<StartSessionOutput, StartSessionError, Self>
pub fn customize( self ) -> CustomizableOperation<StartSessionOutput, StartSessionError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
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 get_target(&self) -> &Option<String>
pub fn get_target(&self) -> &Option<String>
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 get_document_name(&self) -> &Option<String>
pub fn get_document_name(&self) -> &Option<String>
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 get_reason(&self) -> &Option<String>
pub fn get_reason(&self) -> &Option<String>
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§
source§impl Clone for StartSessionFluentBuilder
impl Clone for StartSessionFluentBuilder
source§fn clone(&self) -> StartSessionFluentBuilder
fn clone(&self) -> StartSessionFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more