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