aws_sdk_ec2/operation/create_volume/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_volume::_create_volume_output::CreateVolumeOutputBuilder;
3
4pub use crate::operation::create_volume::_create_volume_input::CreateVolumeInputBuilder;
5
6impl crate::operation::create_volume::builders::CreateVolumeInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_volume::CreateVolumeOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_volume::CreateVolumeError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_volume();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateVolume`.
24///
25/// <p>Creates an EBS volume that can be attached to an instance in the same Availability Zone.</p>
26/// <p>You can create a new empty volume or restore a volume from an EBS snapshot. Any Amazon Web Services Marketplace product codes from the snapshot are propagated to the volume.</p>
27/// <p>You can create encrypted volumes. Encrypted volumes must be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption.html">Amazon EBS encryption</a> in the <i>Amazon EBS User Guide</i>.</p>
28/// <p>You can tag your volumes during creation. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html">Tag your Amazon EC2 resources</a> in the <i>Amazon EC2 User Guide</i>.</p>
29/// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-creating-volume.html">Create an Amazon EBS volume</a> in the <i>Amazon EBS User Guide</i>.</p>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct CreateVolumeFluentBuilder {
32 handle: ::std::sync::Arc<crate::client::Handle>,
33 inner: crate::operation::create_volume::builders::CreateVolumeInputBuilder,
34 config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37 crate::client::customize::internal::CustomizableSend<
38 crate::operation::create_volume::CreateVolumeOutput,
39 crate::operation::create_volume::CreateVolumeError,
40 > for CreateVolumeFluentBuilder
41{
42 fn send(
43 self,
44 config_override: crate::config::Builder,
45 ) -> crate::client::customize::internal::BoxFuture<
46 crate::client::customize::internal::SendResult<
47 crate::operation::create_volume::CreateVolumeOutput,
48 crate::operation::create_volume::CreateVolumeError,
49 >,
50 > {
51 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52 }
53}
54impl CreateVolumeFluentBuilder {
55 /// Creates a new `CreateVolumeFluentBuilder`.
56 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57 Self {
58 handle,
59 inner: ::std::default::Default::default(),
60 config_override: ::std::option::Option::None,
61 }
62 }
63 /// Access the CreateVolume as a reference.
64 pub fn as_input(&self) -> &crate::operation::create_volume::builders::CreateVolumeInputBuilder {
65 &self.inner
66 }
67 /// Sends the request and returns the response.
68 ///
69 /// If an error occurs, an `SdkError` will be returned with additional details that
70 /// can be matched against.
71 ///
72 /// By default, any retryable failures will be retried twice. Retry behavior
73 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74 /// set when configuring the client.
75 pub async fn send(
76 self,
77 ) -> ::std::result::Result<
78 crate::operation::create_volume::CreateVolumeOutput,
79 ::aws_smithy_runtime_api::client::result::SdkError<
80 crate::operation::create_volume::CreateVolumeError,
81 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82 >,
83 > {
84 let input = self
85 .inner
86 .build()
87 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88 let runtime_plugins = crate::operation::create_volume::CreateVolume::operation_runtime_plugins(
89 self.handle.runtime_plugins.clone(),
90 &self.handle.conf,
91 self.config_override,
92 );
93 crate::operation::create_volume::CreateVolume::orchestrate(&runtime_plugins, input).await
94 }
95
96 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97 pub fn customize(
98 self,
99 ) -> crate::client::customize::CustomizableOperation<
100 crate::operation::create_volume::CreateVolumeOutput,
101 crate::operation::create_volume::CreateVolumeError,
102 Self,
103 > {
104 crate::client::customize::CustomizableOperation::new(self)
105 }
106 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107 self.set_config_override(::std::option::Option::Some(config_override.into()));
108 self
109 }
110
111 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112 self.config_override = config_override;
113 self
114 }
115 /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
116 pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.inner = self.inner.availability_zone(input.into());
118 self
119 }
120 /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
121 pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.inner = self.inner.set_availability_zone(input);
123 self
124 }
125 /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
126 pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
127 self.inner.get_availability_zone()
128 }
129 /// <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>
130 /// <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>
131 pub fn encrypted(mut self, input: bool) -> Self {
132 self.inner = self.inner.encrypted(input);
133 self
134 }
135 /// <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>
136 /// <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>
137 pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
138 self.inner = self.inner.set_encrypted(input);
139 self
140 }
141 /// <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>
142 /// <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>
143 pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
144 self.inner.get_encrypted()
145 }
146 /// <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>
147 /// <p>The following are the supported values for each volume type:</p>
148 /// <ul>
149 /// <li>
150 /// <p><code>gp3</code>: 3,000 - 16,000 IOPS</p></li>
151 /// <li>
152 /// <p><code>io1</code>: 100 - 64,000 IOPS</p></li>
153 /// <li>
154 /// <p><code>io2</code>: 100 - 256,000 IOPS</p></li>
155 /// </ul>
156 /// <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>
157 /// <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>
158 pub fn iops(mut self, input: i32) -> Self {
159 self.inner = self.inner.iops(input);
160 self
161 }
162 /// <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>
163 /// <p>The following are the supported values for each volume type:</p>
164 /// <ul>
165 /// <li>
166 /// <p><code>gp3</code>: 3,000 - 16,000 IOPS</p></li>
167 /// <li>
168 /// <p><code>io1</code>: 100 - 64,000 IOPS</p></li>
169 /// <li>
170 /// <p><code>io2</code>: 100 - 256,000 IOPS</p></li>
171 /// </ul>
172 /// <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>
173 /// <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>
174 pub fn set_iops(mut self, input: ::std::option::Option<i32>) -> Self {
175 self.inner = self.inner.set_iops(input);
176 self
177 }
178 /// <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>
179 /// <p>The following are the supported values for each volume type:</p>
180 /// <ul>
181 /// <li>
182 /// <p><code>gp3</code>: 3,000 - 16,000 IOPS</p></li>
183 /// <li>
184 /// <p><code>io1</code>: 100 - 64,000 IOPS</p></li>
185 /// <li>
186 /// <p><code>io2</code>: 100 - 256,000 IOPS</p></li>
187 /// </ul>
188 /// <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>
189 /// <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>
190 pub fn get_iops(&self) -> &::std::option::Option<i32> {
191 self.inner.get_iops()
192 }
193 /// <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>
194 /// <p>You can specify the KMS key using any of the following:</p>
195 /// <ul>
196 /// <li>
197 /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
198 /// <li>
199 /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
200 /// <li>
201 /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
202 /// <li>
203 /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
204 /// </ul>
205 /// <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>
206 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 self.inner = self.inner.kms_key_id(input.into());
208 self
209 }
210 /// <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>
211 /// <p>You can specify the KMS key using any of the following:</p>
212 /// <ul>
213 /// <li>
214 /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
215 /// <li>
216 /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
217 /// <li>
218 /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
219 /// <li>
220 /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
221 /// </ul>
222 /// <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>
223 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
224 self.inner = self.inner.set_kms_key_id(input);
225 self
226 }
227 /// <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>
228 /// <p>You can specify the KMS key using any of the following:</p>
229 /// <ul>
230 /// <li>
231 /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
232 /// <li>
233 /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
234 /// <li>
235 /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
236 /// <li>
237 /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
238 /// </ul>
239 /// <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>
240 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
241 self.inner.get_kms_key_id()
242 }
243 /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
244 /// <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>
245 pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
246 self.inner = self.inner.outpost_arn(input.into());
247 self
248 }
249 /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
250 /// <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>
251 pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252 self.inner = self.inner.set_outpost_arn(input);
253 self
254 }
255 /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
256 /// <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>
257 pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
258 self.inner.get_outpost_arn()
259 }
260 /// <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>
261 /// <p>The following are the supported volumes sizes for each volume type:</p>
262 /// <ul>
263 /// <li>
264 /// <p><code>gp2</code> and <code>gp3</code>: 1 - 16,384 GiB</p></li>
265 /// <li>
266 /// <p><code>io1</code>: 4 - 16,384 GiB</p></li>
267 /// <li>
268 /// <p><code>io2</code>: 4 - 65,536 GiB</p></li>
269 /// <li>
270 /// <p><code>st1</code> and <code>sc1</code>: 125 - 16,384 GiB</p></li>
271 /// <li>
272 /// <p><code>standard</code>: 1 - 1024 GiB</p></li>
273 /// </ul>
274 pub fn size(mut self, input: i32) -> Self {
275 self.inner = self.inner.size(input);
276 self
277 }
278 /// <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>
279 /// <p>The following are the supported volumes sizes for each volume type:</p>
280 /// <ul>
281 /// <li>
282 /// <p><code>gp2</code> and <code>gp3</code>: 1 - 16,384 GiB</p></li>
283 /// <li>
284 /// <p><code>io1</code>: 4 - 16,384 GiB</p></li>
285 /// <li>
286 /// <p><code>io2</code>: 4 - 65,536 GiB</p></li>
287 /// <li>
288 /// <p><code>st1</code> and <code>sc1</code>: 125 - 16,384 GiB</p></li>
289 /// <li>
290 /// <p><code>standard</code>: 1 - 1024 GiB</p></li>
291 /// </ul>
292 pub fn set_size(mut self, input: ::std::option::Option<i32>) -> Self {
293 self.inner = self.inner.set_size(input);
294 self
295 }
296 /// <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>
297 /// <p>The following are the supported volumes sizes for each volume type:</p>
298 /// <ul>
299 /// <li>
300 /// <p><code>gp2</code> and <code>gp3</code>: 1 - 16,384 GiB</p></li>
301 /// <li>
302 /// <p><code>io1</code>: 4 - 16,384 GiB</p></li>
303 /// <li>
304 /// <p><code>io2</code>: 4 - 65,536 GiB</p></li>
305 /// <li>
306 /// <p><code>st1</code> and <code>sc1</code>: 125 - 16,384 GiB</p></li>
307 /// <li>
308 /// <p><code>standard</code>: 1 - 1024 GiB</p></li>
309 /// </ul>
310 pub fn get_size(&self) -> &::std::option::Option<i32> {
311 self.inner.get_size()
312 }
313 /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
314 pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
315 self.inner = self.inner.snapshot_id(input.into());
316 self
317 }
318 /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
319 pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
320 self.inner = self.inner.set_snapshot_id(input);
321 self
322 }
323 /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
324 pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
325 self.inner.get_snapshot_id()
326 }
327 /// <p>The volume type. This parameter can be one of the following values:</p>
328 /// <ul>
329 /// <li>
330 /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
331 /// <li>
332 /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
333 /// <li>
334 /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
335 /// <li>
336 /// <p>Cold HDD: <code>sc1</code></p></li>
337 /// <li>
338 /// <p>Magnetic: <code>standard</code></p></li>
339 /// </ul><important>
340 /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
341 /// </important>
342 /// <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>
343 /// <p>Default: <code>gp2</code></p>
344 pub fn volume_type(mut self, input: crate::types::VolumeType) -> Self {
345 self.inner = self.inner.volume_type(input);
346 self
347 }
348 /// <p>The volume type. This parameter can be one of the following values:</p>
349 /// <ul>
350 /// <li>
351 /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
352 /// <li>
353 /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
354 /// <li>
355 /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
356 /// <li>
357 /// <p>Cold HDD: <code>sc1</code></p></li>
358 /// <li>
359 /// <p>Magnetic: <code>standard</code></p></li>
360 /// </ul><important>
361 /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
362 /// </important>
363 /// <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>
364 /// <p>Default: <code>gp2</code></p>
365 pub fn set_volume_type(mut self, input: ::std::option::Option<crate::types::VolumeType>) -> Self {
366 self.inner = self.inner.set_volume_type(input);
367 self
368 }
369 /// <p>The volume type. This parameter can be one of the following values:</p>
370 /// <ul>
371 /// <li>
372 /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
373 /// <li>
374 /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
375 /// <li>
376 /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
377 /// <li>
378 /// <p>Cold HDD: <code>sc1</code></p></li>
379 /// <li>
380 /// <p>Magnetic: <code>standard</code></p></li>
381 /// </ul><important>
382 /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
383 /// </important>
384 /// <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>
385 /// <p>Default: <code>gp2</code></p>
386 pub fn get_volume_type(&self) -> &::std::option::Option<crate::types::VolumeType> {
387 self.inner.get_volume_type()
388 }
389 ///
390 /// Appends an item to `TagSpecifications`.
391 ///
392 /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
393 ///
394 /// <p>The tags to apply to the volume during creation.</p>
395 pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
396 self.inner = self.inner.tag_specifications(input);
397 self
398 }
399 /// <p>The tags to apply to the volume during creation.</p>
400 pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
401 self.inner = self.inner.set_tag_specifications(input);
402 self
403 }
404 /// <p>The tags to apply to the volume during creation.</p>
405 pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
406 self.inner.get_tag_specifications()
407 }
408 /// <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>
409 pub fn multi_attach_enabled(mut self, input: bool) -> Self {
410 self.inner = self.inner.multi_attach_enabled(input);
411 self
412 }
413 /// <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>
414 pub fn set_multi_attach_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
415 self.inner = self.inner.set_multi_attach_enabled(input);
416 self
417 }
418 /// <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>
419 pub fn get_multi_attach_enabled(&self) -> &::std::option::Option<bool> {
420 self.inner.get_multi_attach_enabled()
421 }
422 /// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
423 /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
424 /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
425 pub fn throughput(mut self, input: i32) -> Self {
426 self.inner = self.inner.throughput(input);
427 self
428 }
429 /// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
430 /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
431 /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
432 pub fn set_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
433 self.inner = self.inner.set_throughput(input);
434 self
435 }
436 /// <p>The throughput to provision for a volume, with a maximum of 1,000 MiB/s.</p>
437 /// <p>This parameter is valid only for <code>gp3</code> volumes.</p>
438 /// <p>Valid Range: Minimum value of 125. Maximum value of 1000.</p>
439 pub fn get_throughput(&self) -> &::std::option::Option<i32> {
440 self.inner.get_throughput()
441 }
442 /// <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>
443 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
444 self.inner = self.inner.client_token(input.into());
445 self
446 }
447 /// <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>
448 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
449 self.inner = self.inner.set_client_token(input);
450 self
451 }
452 /// <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>
453 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
454 self.inner.get_client_token()
455 }
456 /// <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>
457 /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
458 /// <ul>
459 /// <li>
460 /// <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>
461 /// <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>
462 /// </note></li>
463 /// <li>
464 /// <p>You want to create a volume that is initialized at the default rate.</p></li>
465 /// </ul>
466 /// <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>
467 /// <p>Valid range: 100 - 300 MiB/s</p>
468 pub fn volume_initialization_rate(mut self, input: i32) -> Self {
469 self.inner = self.inner.volume_initialization_rate(input);
470 self
471 }
472 /// <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>
473 /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
474 /// <ul>
475 /// <li>
476 /// <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>
477 /// <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>
478 /// </note></li>
479 /// <li>
480 /// <p>You want to create a volume that is initialized at the default rate.</p></li>
481 /// </ul>
482 /// <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>
483 /// <p>Valid range: 100 - 300 MiB/s</p>
484 pub fn set_volume_initialization_rate(mut self, input: ::std::option::Option<i32>) -> Self {
485 self.inner = self.inner.set_volume_initialization_rate(input);
486 self
487 }
488 /// <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>
489 /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
490 /// <ul>
491 /// <li>
492 /// <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>
493 /// <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>
494 /// </note></li>
495 /// <li>
496 /// <p>You want to create a volume that is initialized at the default rate.</p></li>
497 /// </ul>
498 /// <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>
499 /// <p>Valid range: 100 - 300 MiB/s</p>
500 pub fn get_volume_initialization_rate(&self) -> &::std::option::Option<i32> {
501 self.inner.get_volume_initialization_rate()
502 }
503 /// <p>Reserved for internal use.</p>
504 pub fn operator(mut self, input: crate::types::OperatorRequest) -> Self {
505 self.inner = self.inner.operator(input);
506 self
507 }
508 /// <p>Reserved for internal use.</p>
509 pub fn set_operator(mut self, input: ::std::option::Option<crate::types::OperatorRequest>) -> Self {
510 self.inner = self.inner.set_operator(input);
511 self
512 }
513 /// <p>Reserved for internal use.</p>
514 pub fn get_operator(&self) -> &::std::option::Option<crate::types::OperatorRequest> {
515 self.inner.get_operator()
516 }
517 /// <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>
518 pub fn dry_run(mut self, input: bool) -> Self {
519 self.inner = self.inner.dry_run(input);
520 self
521 }
522 /// <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>
523 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
524 self.inner = self.inner.set_dry_run(input);
525 self
526 }
527 /// <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>
528 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
529 self.inner.get_dry_run()
530 }
531}