aws_sdk_ec2/operation/create_volume/
_create_volume_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateVolumeInput {
6    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
7    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
8    pub availability_zone: ::std::option::Option<::std::string::String>,
9    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>use1-az1</code>.</p>
10    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
11    pub availability_zone_id: ::std::option::Option<::std::string::String>,
12    /// <p>Indicates whether the volume should be encrypted. The effect of setting the encryption state to <code>true</code> depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/work-with-ebs-encr.html#encryption-by-default">Encryption by default</a> in the <i>Amazon EBS User Guide</i>.</p>
13    /// <p>Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html#ebs-encryption_supported_instances">Supported instance types</a>.</p>
14    pub encrypted: ::std::option::Option<bool>,
15    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
16    /// <p>The following are the supported values for each volume type:</p>
17    /// <ul>
18    /// <li>
19    /// <p><code>gp3</code>: 3,000 - 16,000 IOPS</p></li>
20    /// <li>
21    /// <p><code>io1</code>: 100 - 64,000 IOPS</p></li>
22    /// <li>
23    /// <p><code>io2</code>: 100 - 256,000 IOPS</p></li>
24    /// </ul>
25    /// <p>For <code>io2</code> volumes, you can achieve up to 256,000 IOPS on <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">instances built on the Nitro System</a>. On other instances, you can achieve performance up to 32,000 IOPS.</p>
26    /// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes. The default for <code>gp3</code> volumes is 3,000 IOPS. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
27    pub iops: ::std::option::Option<i32>,
28    /// <p>The identifier of the KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is specified, the encrypted state must be <code>true</code>.</p>
29    /// <p>You can specify the KMS key using any of the following:</p>
30    /// <ul>
31    /// <li>
32    /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
33    /// <li>
34    /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
35    /// <li>
36    /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
37    /// <li>
38    /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
39    /// </ul>
40    /// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.</p>
41    pub kms_key_id: ::std::option::Option<::std::string::String>,
42    /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
43    /// <p>If you intend to use a volume with an instance running on an outpost, then you must create the volume on the same outpost as the instance. You can't use a volume created in an Amazon Web Services Region with an instance on an Amazon Web Services outpost, or the other way around.</p>
44    pub outpost_arn: ::std::option::Option<::std::string::String>,
45    /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.</p>
46    /// <p>The following are the supported volumes sizes for each volume type:</p>
47    /// <ul>
48    /// <li>
49    /// <p><code>gp2</code> and <code>gp3</code>: 1 - 16,384 GiB</p></li>
50    /// <li>
51    /// <p><code>io1</code>: 4 - 16,384 GiB</p></li>
52    /// <li>
53    /// <p><code>io2</code>: 4 - 65,536 GiB</p></li>
54    /// <li>
55    /// <p><code>st1</code> and <code>sc1</code>: 125 - 16,384 GiB</p></li>
56    /// <li>
57    /// <p><code>standard</code>: 1 - 1024 GiB</p></li>
58    /// </ul>
59    pub size: ::std::option::Option<i32>,
60    /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
61    pub snapshot_id: ::std::option::Option<::std::string::String>,
62    /// <p>The volume type. This parameter can be one of the following values:</p>
63    /// <ul>
64    /// <li>
65    /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
66    /// <li>
67    /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
68    /// <li>
69    /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
70    /// <li>
71    /// <p>Cold HDD: <code>sc1</code></p></li>
72    /// <li>
73    /// <p>Magnetic: <code>standard</code></p></li>
74    /// </ul><important>
75    /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
76    /// </important>
77    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html">Amazon EBS volume types</a> in the <i>Amazon EBS User Guide</i>.</p>
78    /// <p>Default: <code>gp2</code></p>
79    pub volume_type: ::std::option::Option<crate::types::VolumeType>,
80    /// <p>The tags to apply to the volume during creation.</p>
81    pub tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
82    /// <p>Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">Instances built on the Nitro System</a> in the same Availability Zone. This parameter is supported with <code>io1</code> and <code>io2</code> volumes only. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volumes-multi.html"> Amazon EBS Multi-Attach</a> in the <i>Amazon EBS User Guide</i>.</p>
83    pub multi_attach_enabled: ::std::option::Option<bool>,
84    /// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
85    /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
86    /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
87    pub throughput: ::std::option::Option<i32>,
88    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensure Idempotency</a>.</p>
89    pub client_token: ::std::option::Option<::std::string::String>,
90    /// <p>Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), in MiB/s, at which to download the snapshot blocks from Amazon S3 to the volume. This is also known as <i>volume initialization</i>. Specifying a volume initialization rate ensures that the volume is initialized at a predictable and consistent rate after creation.</p>
91    /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
92    /// <ul>
93    /// <li>
94    /// <p>You want to create the volume using fast snapshot restore. You must specify a snapshot that is enabled for fast snapshot restore. In this case, the volume is fully initialized at creation.</p><note>
95    /// <p>If you specify a snapshot that is enabled for fast snapshot restore and a volume initialization rate, the volume will be initialized at the specified rate instead of fast snapshot restore.</p>
96    /// </note></li>
97    /// <li>
98    /// <p>You want to create a volume that is initialized at the default rate.</p></li>
99    /// </ul>
100    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/initalize-volume.html"> Initialize Amazon EBS volumes</a> in the <i>Amazon EC2 User Guide</i>.</p>
101    /// <p>Valid range: 100 - 300 MiB/s</p>
102    pub volume_initialization_rate: ::std::option::Option<i32>,
103    /// <p>Reserved for internal use.</p>
104    pub operator: ::std::option::Option<crate::types::OperatorRequest>,
105    /// <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>
106    pub dry_run: ::std::option::Option<bool>,
107}
108impl CreateVolumeInput {
109    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
110    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
111    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
112        self.availability_zone.as_deref()
113    }
114    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>use1-az1</code>.</p>
115    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
116    pub fn availability_zone_id(&self) -> ::std::option::Option<&str> {
117        self.availability_zone_id.as_deref()
118    }
119    /// <p>Indicates whether the volume should be encrypted. The effect of setting the encryption state to <code>true</code> depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/work-with-ebs-encr.html#encryption-by-default">Encryption by default</a> in the <i>Amazon EBS User Guide</i>.</p>
120    /// <p>Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html#ebs-encryption_supported_instances">Supported instance types</a>.</p>
121    pub fn encrypted(&self) -> ::std::option::Option<bool> {
122        self.encrypted
123    }
124    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
125    /// <p>The following are the supported values for each volume type:</p>
126    /// <ul>
127    /// <li>
128    /// <p><code>gp3</code>: 3,000 - 16,000 IOPS</p></li>
129    /// <li>
130    /// <p><code>io1</code>: 100 - 64,000 IOPS</p></li>
131    /// <li>
132    /// <p><code>io2</code>: 100 - 256,000 IOPS</p></li>
133    /// </ul>
134    /// <p>For <code>io2</code> volumes, you can achieve up to 256,000 IOPS on <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">instances built on the Nitro System</a>. On other instances, you can achieve performance up to 32,000 IOPS.</p>
135    /// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes. The default for <code>gp3</code> volumes is 3,000 IOPS. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
136    pub fn iops(&self) -> ::std::option::Option<i32> {
137        self.iops
138    }
139    /// <p>The identifier of the KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is specified, the encrypted state must be <code>true</code>.</p>
140    /// <p>You can specify the KMS key using any of the following:</p>
141    /// <ul>
142    /// <li>
143    /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
144    /// <li>
145    /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
146    /// <li>
147    /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
148    /// <li>
149    /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
150    /// </ul>
151    /// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.</p>
152    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
153        self.kms_key_id.as_deref()
154    }
155    /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
156    /// <p>If you intend to use a volume with an instance running on an outpost, then you must create the volume on the same outpost as the instance. You can't use a volume created in an Amazon Web Services Region with an instance on an Amazon Web Services outpost, or the other way around.</p>
157    pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
158        self.outpost_arn.as_deref()
159    }
160    /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.</p>
161    /// <p>The following are the supported volumes sizes for each volume type:</p>
162    /// <ul>
163    /// <li>
164    /// <p><code>gp2</code> and <code>gp3</code>: 1 - 16,384 GiB</p></li>
165    /// <li>
166    /// <p><code>io1</code>: 4 - 16,384 GiB</p></li>
167    /// <li>
168    /// <p><code>io2</code>: 4 - 65,536 GiB</p></li>
169    /// <li>
170    /// <p><code>st1</code> and <code>sc1</code>: 125 - 16,384 GiB</p></li>
171    /// <li>
172    /// <p><code>standard</code>: 1 - 1024 GiB</p></li>
173    /// </ul>
174    pub fn size(&self) -> ::std::option::Option<i32> {
175        self.size
176    }
177    /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
178    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
179        self.snapshot_id.as_deref()
180    }
181    /// <p>The volume type. This parameter can be one of the following values:</p>
182    /// <ul>
183    /// <li>
184    /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
185    /// <li>
186    /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
187    /// <li>
188    /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
189    /// <li>
190    /// <p>Cold HDD: <code>sc1</code></p></li>
191    /// <li>
192    /// <p>Magnetic: <code>standard</code></p></li>
193    /// </ul><important>
194    /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
195    /// </important>
196    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html">Amazon EBS volume types</a> in the <i>Amazon EBS User Guide</i>.</p>
197    /// <p>Default: <code>gp2</code></p>
198    pub fn volume_type(&self) -> ::std::option::Option<&crate::types::VolumeType> {
199        self.volume_type.as_ref()
200    }
201    /// <p>The tags to apply to the volume during creation.</p>
202    ///
203    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_specifications.is_none()`.
204    pub fn tag_specifications(&self) -> &[crate::types::TagSpecification] {
205        self.tag_specifications.as_deref().unwrap_or_default()
206    }
207    /// <p>Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">Instances built on the Nitro System</a> in the same Availability Zone. This parameter is supported with <code>io1</code> and <code>io2</code> volumes only. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volumes-multi.html"> Amazon EBS Multi-Attach</a> in the <i>Amazon EBS User Guide</i>.</p>
208    pub fn multi_attach_enabled(&self) -> ::std::option::Option<bool> {
209        self.multi_attach_enabled
210    }
211    /// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
212    /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
213    /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
214    pub fn throughput(&self) -> ::std::option::Option<i32> {
215        self.throughput
216    }
217    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensure Idempotency</a>.</p>
218    pub fn client_token(&self) -> ::std::option::Option<&str> {
219        self.client_token.as_deref()
220    }
221    /// <p>Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), in MiB/s, at which to download the snapshot blocks from Amazon S3 to the volume. This is also known as <i>volume initialization</i>. Specifying a volume initialization rate ensures that the volume is initialized at a predictable and consistent rate after creation.</p>
222    /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
223    /// <ul>
224    /// <li>
225    /// <p>You want to create the volume using fast snapshot restore. You must specify a snapshot that is enabled for fast snapshot restore. In this case, the volume is fully initialized at creation.</p><note>
226    /// <p>If you specify a snapshot that is enabled for fast snapshot restore and a volume initialization rate, the volume will be initialized at the specified rate instead of fast snapshot restore.</p>
227    /// </note></li>
228    /// <li>
229    /// <p>You want to create a volume that is initialized at the default rate.</p></li>
230    /// </ul>
231    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/initalize-volume.html"> Initialize Amazon EBS volumes</a> in the <i>Amazon EC2 User Guide</i>.</p>
232    /// <p>Valid range: 100 - 300 MiB/s</p>
233    pub fn volume_initialization_rate(&self) -> ::std::option::Option<i32> {
234        self.volume_initialization_rate
235    }
236    /// <p>Reserved for internal use.</p>
237    pub fn operator(&self) -> ::std::option::Option<&crate::types::OperatorRequest> {
238        self.operator.as_ref()
239    }
240    /// <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>
241    pub fn dry_run(&self) -> ::std::option::Option<bool> {
242        self.dry_run
243    }
244}
245impl CreateVolumeInput {
246    /// Creates a new builder-style object to manufacture [`CreateVolumeInput`](crate::operation::create_volume::CreateVolumeInput).
247    pub fn builder() -> crate::operation::create_volume::builders::CreateVolumeInputBuilder {
248        crate::operation::create_volume::builders::CreateVolumeInputBuilder::default()
249    }
250}
251
252/// A builder for [`CreateVolumeInput`](crate::operation::create_volume::CreateVolumeInput).
253#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
254#[non_exhaustive]
255pub struct CreateVolumeInputBuilder {
256    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
257    pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
258    pub(crate) encrypted: ::std::option::Option<bool>,
259    pub(crate) iops: ::std::option::Option<i32>,
260    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
261    pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
262    pub(crate) size: ::std::option::Option<i32>,
263    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
264    pub(crate) volume_type: ::std::option::Option<crate::types::VolumeType>,
265    pub(crate) tag_specifications: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>,
266    pub(crate) multi_attach_enabled: ::std::option::Option<bool>,
267    pub(crate) throughput: ::std::option::Option<i32>,
268    pub(crate) client_token: ::std::option::Option<::std::string::String>,
269    pub(crate) volume_initialization_rate: ::std::option::Option<i32>,
270    pub(crate) operator: ::std::option::Option<crate::types::OperatorRequest>,
271    pub(crate) dry_run: ::std::option::Option<bool>,
272}
273impl CreateVolumeInputBuilder {
274    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
275    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
276    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
277        self.availability_zone = ::std::option::Option::Some(input.into());
278        self
279    }
280    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
281    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
282    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283        self.availability_zone = input;
284        self
285    }
286    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
287    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
288    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
289        &self.availability_zone
290    }
291    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>use1-az1</code>.</p>
292    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
293    pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
294        self.availability_zone_id = ::std::option::Option::Some(input.into());
295        self
296    }
297    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>use1-az1</code>.</p>
298    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
299    pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
300        self.availability_zone_id = input;
301        self
302    }
303    /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>use1-az1</code>.</p>
304    /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
305    pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
306        &self.availability_zone_id
307    }
308    /// <p>Indicates whether the volume should be encrypted. The effect of setting the encryption state to <code>true</code> depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/work-with-ebs-encr.html#encryption-by-default">Encryption by default</a> in the <i>Amazon EBS User Guide</i>.</p>
309    /// <p>Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html#ebs-encryption_supported_instances">Supported instance types</a>.</p>
310    pub fn encrypted(mut self, input: bool) -> Self {
311        self.encrypted = ::std::option::Option::Some(input);
312        self
313    }
314    /// <p>Indicates whether the volume should be encrypted. The effect of setting the encryption state to <code>true</code> depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/work-with-ebs-encr.html#encryption-by-default">Encryption by default</a> in the <i>Amazon EBS User Guide</i>.</p>
315    /// <p>Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html#ebs-encryption_supported_instances">Supported instance types</a>.</p>
316    pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
317        self.encrypted = input;
318        self
319    }
320    /// <p>Indicates whether the volume should be encrypted. The effect of setting the encryption state to <code>true</code> depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/work-with-ebs-encr.html#encryption-by-default">Encryption by default</a> in the <i>Amazon EBS User Guide</i>.</p>
321    /// <p>Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html#ebs-encryption_supported_instances">Supported instance types</a>.</p>
322    pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
323        &self.encrypted
324    }
325    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
326    /// <p>The following are the supported values for each volume type:</p>
327    /// <ul>
328    /// <li>
329    /// <p><code>gp3</code>: 3,000 - 16,000 IOPS</p></li>
330    /// <li>
331    /// <p><code>io1</code>: 100 - 64,000 IOPS</p></li>
332    /// <li>
333    /// <p><code>io2</code>: 100 - 256,000 IOPS</p></li>
334    /// </ul>
335    /// <p>For <code>io2</code> volumes, you can achieve up to 256,000 IOPS on <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">instances built on the Nitro System</a>. On other instances, you can achieve performance up to 32,000 IOPS.</p>
336    /// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes. The default for <code>gp3</code> volumes is 3,000 IOPS. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
337    pub fn iops(mut self, input: i32) -> Self {
338        self.iops = ::std::option::Option::Some(input);
339        self
340    }
341    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
342    /// <p>The following are the supported values for each volume type:</p>
343    /// <ul>
344    /// <li>
345    /// <p><code>gp3</code>: 3,000 - 16,000 IOPS</p></li>
346    /// <li>
347    /// <p><code>io1</code>: 100 - 64,000 IOPS</p></li>
348    /// <li>
349    /// <p><code>io2</code>: 100 - 256,000 IOPS</p></li>
350    /// </ul>
351    /// <p>For <code>io2</code> volumes, you can achieve up to 256,000 IOPS on <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">instances built on the Nitro System</a>. On other instances, you can achieve performance up to 32,000 IOPS.</p>
352    /// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes. The default for <code>gp3</code> volumes is 3,000 IOPS. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
353    pub fn set_iops(mut self, input: ::std::option::Option<i32>) -> Self {
354        self.iops = input;
355        self
356    }
357    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
358    /// <p>The following are the supported values for each volume type:</p>
359    /// <ul>
360    /// <li>
361    /// <p><code>gp3</code>: 3,000 - 16,000 IOPS</p></li>
362    /// <li>
363    /// <p><code>io1</code>: 100 - 64,000 IOPS</p></li>
364    /// <li>
365    /// <p><code>io2</code>: 100 - 256,000 IOPS</p></li>
366    /// </ul>
367    /// <p>For <code>io2</code> volumes, you can achieve up to 256,000 IOPS on <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">instances built on the Nitro System</a>. On other instances, you can achieve performance up to 32,000 IOPS.</p>
368    /// <p>This parameter is required for <code>io1</code> and <code>io2</code> volumes. The default for <code>gp3</code> volumes is 3,000 IOPS. This parameter is not supported for <code>gp2</code>, <code>st1</code>, <code>sc1</code>, or <code>standard</code> volumes.</p>
369    pub fn get_iops(&self) -> &::std::option::Option<i32> {
370        &self.iops
371    }
372    /// <p>The identifier of the KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is specified, the encrypted state must be <code>true</code>.</p>
373    /// <p>You can specify the KMS key using any of the following:</p>
374    /// <ul>
375    /// <li>
376    /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
377    /// <li>
378    /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
379    /// <li>
380    /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
381    /// <li>
382    /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
383    /// </ul>
384    /// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.</p>
385    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
386        self.kms_key_id = ::std::option::Option::Some(input.into());
387        self
388    }
389    /// <p>The identifier of the KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is specified, the encrypted state must be <code>true</code>.</p>
390    /// <p>You can specify the KMS key using any of the following:</p>
391    /// <ul>
392    /// <li>
393    /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
394    /// <li>
395    /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
396    /// <li>
397    /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
398    /// <li>
399    /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
400    /// </ul>
401    /// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.</p>
402    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
403        self.kms_key_id = input;
404        self
405    }
406    /// <p>The identifier of the KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If <code>KmsKeyId</code> is specified, the encrypted state must be <code>true</code>.</p>
407    /// <p>You can specify the KMS key using any of the following:</p>
408    /// <ul>
409    /// <li>
410    /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
411    /// <li>
412    /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
413    /// <li>
414    /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
415    /// <li>
416    /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
417    /// </ul>
418    /// <p>Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.</p>
419    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
420        &self.kms_key_id
421    }
422    /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
423    /// <p>If you intend to use a volume with an instance running on an outpost, then you must create the volume on the same outpost as the instance. You can't use a volume created in an Amazon Web Services Region with an instance on an Amazon Web Services outpost, or the other way around.</p>
424    pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
425        self.outpost_arn = ::std::option::Option::Some(input.into());
426        self
427    }
428    /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
429    /// <p>If you intend to use a volume with an instance running on an outpost, then you must create the volume on the same outpost as the instance. You can't use a volume created in an Amazon Web Services Region with an instance on an Amazon Web Services outpost, or the other way around.</p>
430    pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
431        self.outpost_arn = input;
432        self
433    }
434    /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
435    /// <p>If you intend to use a volume with an instance running on an outpost, then you must create the volume on the same outpost as the instance. You can't use a volume created in an Amazon Web Services Region with an instance on an Amazon Web Services outpost, or the other way around.</p>
436    pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
437        &self.outpost_arn
438    }
439    /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.</p>
440    /// <p>The following are the supported volumes sizes for each volume type:</p>
441    /// <ul>
442    /// <li>
443    /// <p><code>gp2</code> and <code>gp3</code>: 1 - 16,384 GiB</p></li>
444    /// <li>
445    /// <p><code>io1</code>: 4 - 16,384 GiB</p></li>
446    /// <li>
447    /// <p><code>io2</code>: 4 - 65,536 GiB</p></li>
448    /// <li>
449    /// <p><code>st1</code> and <code>sc1</code>: 125 - 16,384 GiB</p></li>
450    /// <li>
451    /// <p><code>standard</code>: 1 - 1024 GiB</p></li>
452    /// </ul>
453    pub fn size(mut self, input: i32) -> Self {
454        self.size = ::std::option::Option::Some(input);
455        self
456    }
457    /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.</p>
458    /// <p>The following are the supported volumes sizes for each volume type:</p>
459    /// <ul>
460    /// <li>
461    /// <p><code>gp2</code> and <code>gp3</code>: 1 - 16,384 GiB</p></li>
462    /// <li>
463    /// <p><code>io1</code>: 4 - 16,384 GiB</p></li>
464    /// <li>
465    /// <p><code>io2</code>: 4 - 65,536 GiB</p></li>
466    /// <li>
467    /// <p><code>st1</code> and <code>sc1</code>: 125 - 16,384 GiB</p></li>
468    /// <li>
469    /// <p><code>standard</code>: 1 - 1024 GiB</p></li>
470    /// </ul>
471    pub fn set_size(mut self, input: ::std::option::Option<i32>) -> Self {
472        self.size = input;
473        self
474    }
475    /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.</p>
476    /// <p>The following are the supported volumes sizes for each volume type:</p>
477    /// <ul>
478    /// <li>
479    /// <p><code>gp2</code> and <code>gp3</code>: 1 - 16,384 GiB</p></li>
480    /// <li>
481    /// <p><code>io1</code>: 4 - 16,384 GiB</p></li>
482    /// <li>
483    /// <p><code>io2</code>: 4 - 65,536 GiB</p></li>
484    /// <li>
485    /// <p><code>st1</code> and <code>sc1</code>: 125 - 16,384 GiB</p></li>
486    /// <li>
487    /// <p><code>standard</code>: 1 - 1024 GiB</p></li>
488    /// </ul>
489    pub fn get_size(&self) -> &::std::option::Option<i32> {
490        &self.size
491    }
492    /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
493    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
494        self.snapshot_id = ::std::option::Option::Some(input.into());
495        self
496    }
497    /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
498    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
499        self.snapshot_id = input;
500        self
501    }
502    /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
503    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
504        &self.snapshot_id
505    }
506    /// <p>The volume type. This parameter can be one of the following values:</p>
507    /// <ul>
508    /// <li>
509    /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
510    /// <li>
511    /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
512    /// <li>
513    /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
514    /// <li>
515    /// <p>Cold HDD: <code>sc1</code></p></li>
516    /// <li>
517    /// <p>Magnetic: <code>standard</code></p></li>
518    /// </ul><important>
519    /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
520    /// </important>
521    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html">Amazon EBS volume types</a> in the <i>Amazon EBS User Guide</i>.</p>
522    /// <p>Default: <code>gp2</code></p>
523    pub fn volume_type(mut self, input: crate::types::VolumeType) -> Self {
524        self.volume_type = ::std::option::Option::Some(input);
525        self
526    }
527    /// <p>The volume type. This parameter can be one of the following values:</p>
528    /// <ul>
529    /// <li>
530    /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
531    /// <li>
532    /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
533    /// <li>
534    /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
535    /// <li>
536    /// <p>Cold HDD: <code>sc1</code></p></li>
537    /// <li>
538    /// <p>Magnetic: <code>standard</code></p></li>
539    /// </ul><important>
540    /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
541    /// </important>
542    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html">Amazon EBS volume types</a> in the <i>Amazon EBS User Guide</i>.</p>
543    /// <p>Default: <code>gp2</code></p>
544    pub fn set_volume_type(mut self, input: ::std::option::Option<crate::types::VolumeType>) -> Self {
545        self.volume_type = input;
546        self
547    }
548    /// <p>The volume type. This parameter can be one of the following values:</p>
549    /// <ul>
550    /// <li>
551    /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
552    /// <li>
553    /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
554    /// <li>
555    /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
556    /// <li>
557    /// <p>Cold HDD: <code>sc1</code></p></li>
558    /// <li>
559    /// <p>Magnetic: <code>standard</code></p></li>
560    /// </ul><important>
561    /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
562    /// </important>
563    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html">Amazon EBS volume types</a> in the <i>Amazon EBS User Guide</i>.</p>
564    /// <p>Default: <code>gp2</code></p>
565    pub fn get_volume_type(&self) -> &::std::option::Option<crate::types::VolumeType> {
566        &self.volume_type
567    }
568    /// Appends an item to `tag_specifications`.
569    ///
570    /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
571    ///
572    /// <p>The tags to apply to the volume during creation.</p>
573    pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
574        let mut v = self.tag_specifications.unwrap_or_default();
575        v.push(input);
576        self.tag_specifications = ::std::option::Option::Some(v);
577        self
578    }
579    /// <p>The tags to apply to the volume during creation.</p>
580    pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
581        self.tag_specifications = input;
582        self
583    }
584    /// <p>The tags to apply to the volume during creation.</p>
585    pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
586        &self.tag_specifications
587    }
588    /// <p>Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">Instances built on the Nitro System</a> in the same Availability Zone. This parameter is supported with <code>io1</code> and <code>io2</code> volumes only. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volumes-multi.html"> Amazon EBS Multi-Attach</a> in the <i>Amazon EBS User Guide</i>.</p>
589    pub fn multi_attach_enabled(mut self, input: bool) -> Self {
590        self.multi_attach_enabled = ::std::option::Option::Some(input);
591        self
592    }
593    /// <p>Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">Instances built on the Nitro System</a> in the same Availability Zone. This parameter is supported with <code>io1</code> and <code>io2</code> volumes only. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volumes-multi.html"> Amazon EBS Multi-Attach</a> in the <i>Amazon EBS User Guide</i>.</p>
594    pub fn set_multi_attach_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
595        self.multi_attach_enabled = input;
596        self
597    }
598    /// <p>Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 <a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html">Instances built on the Nitro System</a> in the same Availability Zone. This parameter is supported with <code>io1</code> and <code>io2</code> volumes only. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volumes-multi.html"> Amazon EBS Multi-Attach</a> in the <i>Amazon EBS User Guide</i>.</p>
599    pub fn get_multi_attach_enabled(&self) -> &::std::option::Option<bool> {
600        &self.multi_attach_enabled
601    }
602    /// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
603    /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
604    /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
605    pub fn throughput(mut self, input: i32) -> Self {
606        self.throughput = ::std::option::Option::Some(input);
607        self
608    }
609    /// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
610    /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
611    /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
612    pub fn set_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
613        self.throughput = input;
614        self
615    }
616    /// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
617    /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
618    /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
619    pub fn get_throughput(&self) -> &::std::option::Option<i32> {
620        &self.throughput
621    }
622    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensure Idempotency</a>.</p>
623    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
624        self.client_token = ::std::option::Option::Some(input.into());
625        self
626    }
627    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensure Idempotency</a>.</p>
628    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
629        self.client_token = input;
630        self
631    }
632    /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensure Idempotency</a>.</p>
633    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
634        &self.client_token
635    }
636    /// <p>Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), in MiB/s, at which to download the snapshot blocks from Amazon S3 to the volume. This is also known as <i>volume initialization</i>. Specifying a volume initialization rate ensures that the volume is initialized at a predictable and consistent rate after creation.</p>
637    /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
638    /// <ul>
639    /// <li>
640    /// <p>You want to create the volume using fast snapshot restore. You must specify a snapshot that is enabled for fast snapshot restore. In this case, the volume is fully initialized at creation.</p><note>
641    /// <p>If you specify a snapshot that is enabled for fast snapshot restore and a volume initialization rate, the volume will be initialized at the specified rate instead of fast snapshot restore.</p>
642    /// </note></li>
643    /// <li>
644    /// <p>You want to create a volume that is initialized at the default rate.</p></li>
645    /// </ul>
646    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/initalize-volume.html"> Initialize Amazon EBS volumes</a> in the <i>Amazon EC2 User Guide</i>.</p>
647    /// <p>Valid range: 100 - 300 MiB/s</p>
648    pub fn volume_initialization_rate(mut self, input: i32) -> Self {
649        self.volume_initialization_rate = ::std::option::Option::Some(input);
650        self
651    }
652    /// <p>Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), in MiB/s, at which to download the snapshot blocks from Amazon S3 to the volume. This is also known as <i>volume initialization</i>. Specifying a volume initialization rate ensures that the volume is initialized at a predictable and consistent rate after creation.</p>
653    /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
654    /// <ul>
655    /// <li>
656    /// <p>You want to create the volume using fast snapshot restore. You must specify a snapshot that is enabled for fast snapshot restore. In this case, the volume is fully initialized at creation.</p><note>
657    /// <p>If you specify a snapshot that is enabled for fast snapshot restore and a volume initialization rate, the volume will be initialized at the specified rate instead of fast snapshot restore.</p>
658    /// </note></li>
659    /// <li>
660    /// <p>You want to create a volume that is initialized at the default rate.</p></li>
661    /// </ul>
662    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/initalize-volume.html"> Initialize Amazon EBS volumes</a> in the <i>Amazon EC2 User Guide</i>.</p>
663    /// <p>Valid range: 100 - 300 MiB/s</p>
664    pub fn set_volume_initialization_rate(mut self, input: ::std::option::Option<i32>) -> Self {
665        self.volume_initialization_rate = input;
666        self
667    }
668    /// <p>Specifies the Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate), in MiB/s, at which to download the snapshot blocks from Amazon S3 to the volume. This is also known as <i>volume initialization</i>. Specifying a volume initialization rate ensures that the volume is initialized at a predictable and consistent rate after creation.</p>
669    /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
670    /// <ul>
671    /// <li>
672    /// <p>You want to create the volume using fast snapshot restore. You must specify a snapshot that is enabled for fast snapshot restore. In this case, the volume is fully initialized at creation.</p><note>
673    /// <p>If you specify a snapshot that is enabled for fast snapshot restore and a volume initialization rate, the volume will be initialized at the specified rate instead of fast snapshot restore.</p>
674    /// </note></li>
675    /// <li>
676    /// <p>You want to create a volume that is initialized at the default rate.</p></li>
677    /// </ul>
678    /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/initalize-volume.html"> Initialize Amazon EBS volumes</a> in the <i>Amazon EC2 User Guide</i>.</p>
679    /// <p>Valid range: 100 - 300 MiB/s</p>
680    pub fn get_volume_initialization_rate(&self) -> &::std::option::Option<i32> {
681        &self.volume_initialization_rate
682    }
683    /// <p>Reserved for internal use.</p>
684    pub fn operator(mut self, input: crate::types::OperatorRequest) -> Self {
685        self.operator = ::std::option::Option::Some(input);
686        self
687    }
688    /// <p>Reserved for internal use.</p>
689    pub fn set_operator(mut self, input: ::std::option::Option<crate::types::OperatorRequest>) -> Self {
690        self.operator = input;
691        self
692    }
693    /// <p>Reserved for internal use.</p>
694    pub fn get_operator(&self) -> &::std::option::Option<crate::types::OperatorRequest> {
695        &self.operator
696    }
697    /// <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>
698    pub fn dry_run(mut self, input: bool) -> Self {
699        self.dry_run = ::std::option::Option::Some(input);
700        self
701    }
702    /// <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>
703    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
704        self.dry_run = input;
705        self
706    }
707    /// <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>
708    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
709        &self.dry_run
710    }
711    /// Consumes the builder and constructs a [`CreateVolumeInput`](crate::operation::create_volume::CreateVolumeInput).
712    pub fn build(
713        self,
714    ) -> ::std::result::Result<crate::operation::create_volume::CreateVolumeInput, ::aws_smithy_types::error::operation::BuildError> {
715        ::std::result::Result::Ok(crate::operation::create_volume::CreateVolumeInput {
716            availability_zone: self.availability_zone,
717            availability_zone_id: self.availability_zone_id,
718            encrypted: self.encrypted,
719            iops: self.iops,
720            kms_key_id: self.kms_key_id,
721            outpost_arn: self.outpost_arn,
722            size: self.size,
723            snapshot_id: self.snapshot_id,
724            volume_type: self.volume_type,
725            tag_specifications: self.tag_specifications,
726            multi_attach_enabled: self.multi_attach_enabled,
727            throughput: self.throughput,
728            client_token: self.client_token,
729            volume_initialization_rate: self.volume_initialization_rate,
730            operator: self.operator,
731            dry_run: self.dry_run,
732        })
733    }
734}