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