Struct aws_sdk_ssm::input::terminate_session_input::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for TerminateSessionInput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn session_id(self, input: impl Into<String>) -> Self
pub fn session_id(self, input: impl Into<String>) -> Self
The ID of the session to terminate.
sourcepub fn set_session_id(self, input: Option<String>) -> Self
pub fn set_session_id(self, input: Option<String>) -> Self
The ID of the session to terminate.
sourcepub fn build(self) -> Result<TerminateSessionInput, BuildError>
pub fn build(self) -> Result<TerminateSessionInput, BuildError>
Consumes the builder and constructs a TerminateSessionInput
.
Examples found in repository?
src/client.rs (line 17057)
17045 17046 17047 17048 17049 17050 17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17075 17076 17077 17078 17079 17080 17081 17082 17083 17084 17085 17086 17087
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::TerminateSession,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::TerminateSessionError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// 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](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::TerminateSessionOutput,
aws_smithy_http::result::SdkError<crate::error::TerminateSessionError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}