1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`AttachVolume`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`gateway_arn(impl Into<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::gateway_arn) / [`set_gateway_arn(Option<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::set_gateway_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the gateway that you want to attach the volume to.</p><br>
    ///   - [`target_name(impl Into<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::target_name) / [`set_target_name(Option<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::set_target_name):<br>required: **false**<br><p>The name of the iSCSI target used by an initiator to connect to a volume and used as a suffix for the target ARN. For example, specifying <code>TargetName</code> as <i>myvolume</i> results in the target ARN of <code>arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume</code>. The target name must be unique across all volumes on a gateway.</p> <p>If you don't specify a value, Storage Gateway uses the value that was previously used for this volume as the new target name.</p><br>
    ///   - [`volume_arn(impl Into<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::volume_arn) / [`set_volume_arn(Option<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::set_volume_arn):<br>required: **true**<br><p>The Amazon Resource Name (ARN) of the volume to attach to the specified gateway.</p><br>
    ///   - [`network_interface_id(impl Into<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::network_interface_id) / [`set_network_interface_id(Option<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::set_network_interface_id):<br>required: **true**<br><p>The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted. Use <code>DescribeGatewayInformation</code> to get a list of the network interfaces available on a gateway.</p> <p>Valid Values: A valid IP address.</p><br>
    ///   - [`disk_id(impl Into<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::disk_id) / [`set_disk_id(Option<String>)`](crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::set_disk_id):<br>required: **false**<br><p>The unique device ID or other distinguishing data that identifies the local disk used to create the volume. This value is only required when you are attaching a stored volume.</p><br>
    /// - On success, responds with [`AttachVolumeOutput`](crate::operation::attach_volume::AttachVolumeOutput) with field(s):
    ///   - [`volume_arn(Option<String>)`](crate::operation::attach_volume::AttachVolumeOutput::volume_arn): <p>The Amazon Resource Name (ARN) of the volume that was attached to the gateway.</p>
    ///   - [`target_arn(Option<String>)`](crate::operation::attach_volume::AttachVolumeOutput::target_arn): <p>The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI name for the initiator that was used to connect to the target.</p>
    /// - On failure, responds with [`SdkError<AttachVolumeError>`](crate::operation::attach_volume::AttachVolumeError)
    pub fn attach_volume(&self) -> crate::operation::attach_volume::builders::AttachVolumeFluentBuilder {
        crate::operation::attach_volume::builders::AttachVolumeFluentBuilder::new(self.handle.clone())
    }
}