Struct aws_sdk_ec2::input::DetachVolumeInput
source · #[non_exhaustive]pub struct DetachVolumeInput { /* private fields */ }
Implementations§
source§impl DetachVolumeInput
impl DetachVolumeInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DetachVolume, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<DetachVolume, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<DetachVolume
>
Examples found in repository?
src/client.rs (line 53323)
53309 53310 53311 53312 53313 53314 53315 53316 53317 53318 53319 53320 53321 53322 53323 53324 53325 53326 53327 53328 53329 53330 53331 53332 53333 53334 53335 53336 53337 53338 53339 53340 53341 53342 53343 53344 53345 53346 53347 53348 53349 53350 53351
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::DetachVolume,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::DetachVolumeError>,
> {
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::DetachVolumeOutput,
aws_smithy_http::result::SdkError<crate::error::DetachVolumeError>,
> {
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
}
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DetachVolumeInput
.
source§impl DetachVolumeInput
impl DetachVolumeInput
sourcepub fn force(&self) -> Option<bool>
pub fn force(&self) -> Option<bool>
Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
The ID of the instance. If you are detaching a Multi-Attach enabled volume, you must specify an instance ID.
Trait Implementations§
source§impl Clone for DetachVolumeInput
impl Clone for DetachVolumeInput
source§fn clone(&self) -> DetachVolumeInput
fn clone(&self) -> DetachVolumeInput
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more