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