1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`DetachVolume`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`device(impl Into<String>)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::device) / [`set_device(Option<String>)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::set_device):<br>required: **false**<br><p>The device name.</p><br>
    ///   - [`force(bool)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::force) / [`set_force(Option<bool>)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::set_force):<br>required: **false**<br><p>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.</p><br>
    ///   - [`instance_id(impl Into<String>)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::instance_id) / [`set_instance_id(Option<String>)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::set_instance_id):<br>required: **false**<br><p>The ID of the instance. If you are detaching a Multi-Attach enabled volume, you must specify an instance ID.</p><br>
    ///   - [`volume_id(impl Into<String>)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::volume_id) / [`set_volume_id(Option<String>)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::set_volume_id):<br>required: **true**<br><p>The ID of the volume.</p><br>
    ///   - [`dry_run(bool)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
    /// - On success, responds with [`DetachVolumeOutput`](crate::operation::detach_volume::DetachVolumeOutput) with field(s):
    ///   - [`attach_time(Option<DateTime>)`](crate::operation::detach_volume::DetachVolumeOutput::attach_time): <p>The time stamp when the attachment initiated.</p>
    ///   - [`device(Option<String>)`](crate::operation::detach_volume::DetachVolumeOutput::device): <p>The device name.</p> <p>If the volume is attached to a Fargate task, this parameter returns <code>null</code>.</p>
    ///   - [`instance_id(Option<String>)`](crate::operation::detach_volume::DetachVolumeOutput::instance_id): <p>The ID of the instance.</p> <p>If the volume is attached to a Fargate task, this parameter returns <code>null</code>.</p>
    ///   - [`state(Option<VolumeAttachmentState>)`](crate::operation::detach_volume::DetachVolumeOutput::state): <p>The attachment state of the volume.</p>
    ///   - [`volume_id(Option<String>)`](crate::operation::detach_volume::DetachVolumeOutput::volume_id): <p>The ID of the volume.</p>
    ///   - [`delete_on_termination(Option<bool>)`](crate::operation::detach_volume::DetachVolumeOutput::delete_on_termination): <p>Indicates whether the EBS volume is deleted on instance termination.</p>
    ///   - [`associated_resource(Option<String>)`](crate::operation::detach_volume::DetachVolumeOutput::associated_resource): <p>The ARN of the Amazon ECS or Fargate task to which the volume is attached.</p>
    ///   - [`instance_owning_service(Option<String>)`](crate::operation::detach_volume::DetachVolumeOutput::instance_owning_service): <p>The service principal of Amazon Web Services service that owns the underlying instance to which the volume is attached.</p> <p>This parameter is returned only for volumes that are attached to Fargate tasks.</p>
    /// - On failure, responds with [`SdkError<DetachVolumeError>`](crate::operation::detach_volume::DetachVolumeError)
    pub fn detach_volume(&self) -> crate::operation::detach_volume::builders::DetachVolumeFluentBuilder {
        crate::operation::detach_volume::builders::DetachVolumeFluentBuilder::new(self.handle.clone())
    }
}