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 /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
117 pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.inner = self.inner.availability_zone(input.into());
119 self
120 }
121 /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
122 /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
123 pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.inner = self.inner.set_availability_zone(input);
125 self
126 }
127 /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>us-east-1a</code>.</p>
128 /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
129 pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
130 self.inner.get_availability_zone()
131 }
132 /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>use1-az1</code>.</p>
133 /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
134 pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135 self.inner = self.inner.availability_zone_id(input.into());
136 self
137 }
138 /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>use1-az1</code>.</p>
139 /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
140 pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.inner = self.inner.set_availability_zone_id(input);
142 self
143 }
144 /// <p>The ID of the Availability Zone in which to create the volume. For example, <code>use1-az1</code>.</p>
145 /// <p>Either <code>AvailabilityZone</code> or <code>AvailabilityZoneId</code> must be specified, but not both.</p>
146 pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
147 self.inner.get_availability_zone_id()
148 }
149 /// <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>
150 /// <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>
151 pub fn encrypted(mut self, input: bool) -> Self {
152 self.inner = self.inner.encrypted(input);
153 self
154 }
155 /// <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>
156 /// <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>
157 pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
158 self.inner = self.inner.set_encrypted(input);
159 self
160 }
161 /// <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>
162 /// <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>
163 pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
164 self.inner.get_encrypted()
165 }
166 /// <p>The number of I/O operations per second (IOPS) to provision for the volume. Required for <code>io1</code> and <code>io2</code> volumes. Optional for <code>gp3</code> volumes. Omit for all other volume types.</p>
167 /// <p>Valid ranges:</p>
168 /// <ul>
169 /// <li>
170 /// <p>gp3: <code>3,000 </code>(<i>default</i>)<code> - 80,000</code> IOPS</p></li>
171 /// <li>
172 /// <p>io1: <code>100 - 64,000</code> IOPS</p></li>
173 /// <li>
174 /// <p>io2: <code>100 - 256,000</code> IOPS</p></li>
175 /// </ul><note>
176 /// <p><a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html"> Instances built on the Nitro System</a> can support up to 256,000 IOPS. Other instances can support up to 32,000 IOPS.</p>
177 /// </note>
178 pub fn iops(mut self, input: i32) -> Self {
179 self.inner = self.inner.iops(input);
180 self
181 }
182 /// <p>The number of I/O operations per second (IOPS) to provision for the volume. Required for <code>io1</code> and <code>io2</code> volumes. Optional for <code>gp3</code> volumes. Omit for all other volume types.</p>
183 /// <p>Valid ranges:</p>
184 /// <ul>
185 /// <li>
186 /// <p>gp3: <code>3,000 </code>(<i>default</i>)<code> - 80,000</code> IOPS</p></li>
187 /// <li>
188 /// <p>io1: <code>100 - 64,000</code> IOPS</p></li>
189 /// <li>
190 /// <p>io2: <code>100 - 256,000</code> IOPS</p></li>
191 /// </ul><note>
192 /// <p><a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html"> Instances built on the Nitro System</a> can support up to 256,000 IOPS. Other instances can support up to 32,000 IOPS.</p>
193 /// </note>
194 pub fn set_iops(mut self, input: ::std::option::Option<i32>) -> Self {
195 self.inner = self.inner.set_iops(input);
196 self
197 }
198 /// <p>The number of I/O operations per second (IOPS) to provision for the volume. Required for <code>io1</code> and <code>io2</code> volumes. Optional for <code>gp3</code> volumes. Omit for all other volume types.</p>
199 /// <p>Valid ranges:</p>
200 /// <ul>
201 /// <li>
202 /// <p>gp3: <code>3,000 </code>(<i>default</i>)<code> - 80,000</code> IOPS</p></li>
203 /// <li>
204 /// <p>io1: <code>100 - 64,000</code> IOPS</p></li>
205 /// <li>
206 /// <p>io2: <code>100 - 256,000</code> IOPS</p></li>
207 /// </ul><note>
208 /// <p><a href="https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html"> Instances built on the Nitro System</a> can support up to 256,000 IOPS. Other instances can support up to 32,000 IOPS.</p>
209 /// </note>
210 pub fn get_iops(&self) -> &::std::option::Option<i32> {
211 self.inner.get_iops()
212 }
213 /// <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>
214 /// <p>You can specify the KMS key using any of the following:</p>
215 /// <ul>
216 /// <li>
217 /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
218 /// <li>
219 /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
220 /// <li>
221 /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
222 /// <li>
223 /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
224 /// </ul>
225 /// <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>
226 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227 self.inner = self.inner.kms_key_id(input.into());
228 self
229 }
230 /// <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>
231 /// <p>You can specify the KMS key using any of the following:</p>
232 /// <ul>
233 /// <li>
234 /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
235 /// <li>
236 /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
237 /// <li>
238 /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
239 /// <li>
240 /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
241 /// </ul>
242 /// <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>
243 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.inner = self.inner.set_kms_key_id(input);
245 self
246 }
247 /// <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>
248 /// <p>You can specify the KMS key using any of the following:</p>
249 /// <ul>
250 /// <li>
251 /// <p>Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
252 /// <li>
253 /// <p>Key alias. For example, alias/ExampleAlias.</p></li>
254 /// <li>
255 /// <p>Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.</p></li>
256 /// <li>
257 /// <p>Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.</p></li>
258 /// </ul>
259 /// <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>
260 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
261 self.inner.get_kms_key_id()
262 }
263 /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
264 /// <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>
265 pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
266 self.inner = self.inner.outpost_arn(input.into());
267 self
268 }
269 /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
270 /// <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>
271 pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272 self.inner = self.inner.set_outpost_arn(input);
273 self
274 }
275 /// <p>The Amazon Resource Name (ARN) of the Outpost on which to create the volume.</p>
276 /// <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>
277 pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
278 self.inner.get_outpost_arn()
279 }
280 /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size, and you can specify a volume size that is equal to or larger than the snapshot size.</p>
281 /// <p>Valid sizes:</p>
282 /// <ul>
283 /// <li>
284 /// <p>gp2: <code>1 - 16,384</code> GiB</p></li>
285 /// <li>
286 /// <p>gp3: <code>1 - 65,536</code> GiB</p></li>
287 /// <li>
288 /// <p>io1: <code>4 - 16,384</code> GiB</p></li>
289 /// <li>
290 /// <p>io2: <code>4 - 65,536</code> GiB</p></li>
291 /// <li>
292 /// <p>st1 and sc1: <code>125 - 16,384</code> GiB</p></li>
293 /// <li>
294 /// <p>standard: <code>1 - 1024</code> GiB</p></li>
295 /// </ul>
296 pub fn size(mut self, input: i32) -> Self {
297 self.inner = self.inner.size(input);
298 self
299 }
300 /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size, and you can specify a volume size that is equal to or larger than the snapshot size.</p>
301 /// <p>Valid sizes:</p>
302 /// <ul>
303 /// <li>
304 /// <p>gp2: <code>1 - 16,384</code> GiB</p></li>
305 /// <li>
306 /// <p>gp3: <code>1 - 65,536</code> GiB</p></li>
307 /// <li>
308 /// <p>io1: <code>4 - 16,384</code> GiB</p></li>
309 /// <li>
310 /// <p>io2: <code>4 - 65,536</code> GiB</p></li>
311 /// <li>
312 /// <p>st1 and sc1: <code>125 - 16,384</code> GiB</p></li>
313 /// <li>
314 /// <p>standard: <code>1 - 1024</code> GiB</p></li>
315 /// </ul>
316 pub fn set_size(mut self, input: ::std::option::Option<i32>) -> Self {
317 self.inner = self.inner.set_size(input);
318 self
319 }
320 /// <p>The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size, and you can specify a volume size that is equal to or larger than the snapshot size.</p>
321 /// <p>Valid sizes:</p>
322 /// <ul>
323 /// <li>
324 /// <p>gp2: <code>1 - 16,384</code> GiB</p></li>
325 /// <li>
326 /// <p>gp3: <code>1 - 65,536</code> GiB</p></li>
327 /// <li>
328 /// <p>io1: <code>4 - 16,384</code> GiB</p></li>
329 /// <li>
330 /// <p>io2: <code>4 - 65,536</code> GiB</p></li>
331 /// <li>
332 /// <p>st1 and sc1: <code>125 - 16,384</code> GiB</p></li>
333 /// <li>
334 /// <p>standard: <code>1 - 1024</code> GiB</p></li>
335 /// </ul>
336 pub fn get_size(&self) -> &::std::option::Option<i32> {
337 self.inner.get_size()
338 }
339 /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
340 pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
341 self.inner = self.inner.snapshot_id(input.into());
342 self
343 }
344 /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
345 pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
346 self.inner = self.inner.set_snapshot_id(input);
347 self
348 }
349 /// <p>The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.</p>
350 pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
351 self.inner.get_snapshot_id()
352 }
353 /// <p>The volume type. This parameter can be one of the following values:</p>
354 /// <ul>
355 /// <li>
356 /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
357 /// <li>
358 /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
359 /// <li>
360 /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
361 /// <li>
362 /// <p>Cold HDD: <code>sc1</code></p></li>
363 /// <li>
364 /// <p>Magnetic: <code>standard</code></p></li>
365 /// </ul><important>
366 /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
367 /// </important>
368 /// <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>
369 /// <p>Default: <code>gp2</code></p>
370 pub fn volume_type(mut self, input: crate::types::VolumeType) -> Self {
371 self.inner = self.inner.volume_type(input);
372 self
373 }
374 /// <p>The volume type. This parameter can be one of the following values:</p>
375 /// <ul>
376 /// <li>
377 /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
378 /// <li>
379 /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
380 /// <li>
381 /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
382 /// <li>
383 /// <p>Cold HDD: <code>sc1</code></p></li>
384 /// <li>
385 /// <p>Magnetic: <code>standard</code></p></li>
386 /// </ul><important>
387 /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
388 /// </important>
389 /// <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>
390 /// <p>Default: <code>gp2</code></p>
391 pub fn set_volume_type(mut self, input: ::std::option::Option<crate::types::VolumeType>) -> Self {
392 self.inner = self.inner.set_volume_type(input);
393 self
394 }
395 /// <p>The volume type. This parameter can be one of the following values:</p>
396 /// <ul>
397 /// <li>
398 /// <p>General Purpose SSD: <code>gp2</code> | <code>gp3</code></p></li>
399 /// <li>
400 /// <p>Provisioned IOPS SSD: <code>io1</code> | <code>io2</code></p></li>
401 /// <li>
402 /// <p>Throughput Optimized HDD: <code>st1</code></p></li>
403 /// <li>
404 /// <p>Cold HDD: <code>sc1</code></p></li>
405 /// <li>
406 /// <p>Magnetic: <code>standard</code></p></li>
407 /// </ul><important>
408 /// <p>Throughput Optimized HDD (<code>st1</code>) and Cold HDD (<code>sc1</code>) volumes can't be used as boot volumes.</p>
409 /// </important>
410 /// <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>
411 /// <p>Default: <code>gp2</code></p>
412 pub fn get_volume_type(&self) -> &::std::option::Option<crate::types::VolumeType> {
413 self.inner.get_volume_type()
414 }
415 ///
416 /// Appends an item to `TagSpecifications`.
417 ///
418 /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
419 ///
420 /// <p>The tags to apply to the volume during creation.</p>
421 pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
422 self.inner = self.inner.tag_specifications(input);
423 self
424 }
425 /// <p>The tags to apply to the volume during creation.</p>
426 pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
427 self.inner = self.inner.set_tag_specifications(input);
428 self
429 }
430 /// <p>The tags to apply to the volume during creation.</p>
431 pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
432 self.inner.get_tag_specifications()
433 }
434 /// <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>
435 pub fn multi_attach_enabled(mut self, input: bool) -> Self {
436 self.inner = self.inner.multi_attach_enabled(input);
437 self
438 }
439 /// <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>
440 pub fn set_multi_attach_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
441 self.inner = self.inner.set_multi_attach_enabled(input);
442 self
443 }
444 /// <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>
445 pub fn get_multi_attach_enabled(&self) -> &::std::option::Option<bool> {
446 self.inner.get_multi_attach_enabled()
447 }
448 /// <p>The throughput to provision for the volume, in MiB/s. Supported for <code>gp3</code> volumes only. Omit for all other volume types.</p>
449 /// <p>Valid Range: <code>125 - 2000</code> MiB/s</p>
450 pub fn throughput(mut self, input: i32) -> Self {
451 self.inner = self.inner.throughput(input);
452 self
453 }
454 /// <p>The throughput to provision for the volume, in MiB/s. Supported for <code>gp3</code> volumes only. Omit for all other volume types.</p>
455 /// <p>Valid Range: <code>125 - 2000</code> MiB/s</p>
456 pub fn set_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
457 self.inner = self.inner.set_throughput(input);
458 self
459 }
460 /// <p>The throughput to provision for the volume, in MiB/s. Supported for <code>gp3</code> volumes only. Omit for all other volume types.</p>
461 /// <p>Valid Range: <code>125 - 2000</code> MiB/s</p>
462 pub fn get_throughput(&self) -> &::std::option::Option<i32> {
463 self.inner.get_throughput()
464 }
465 /// <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>
466 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
467 self.inner = self.inner.client_token(input.into());
468 self
469 }
470 /// <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>
471 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
472 self.inner = self.inner.set_client_token(input);
473 self
474 }
475 /// <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>
476 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
477 self.inner.get_client_token()
478 }
479 /// <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>
480 /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
481 /// <ul>
482 /// <li>
483 /// <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>
484 /// <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>
485 /// </note></li>
486 /// <li>
487 /// <p>You want to create a volume that is initialized at the default rate.</p></li>
488 /// </ul>
489 /// <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>
490 /// <p>Valid range: 100 - 300 MiB/s</p>
491 pub fn volume_initialization_rate(mut self, input: i32) -> Self {
492 self.inner = self.inner.volume_initialization_rate(input);
493 self
494 }
495 /// <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>
496 /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
497 /// <ul>
498 /// <li>
499 /// <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>
500 /// <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>
501 /// </note></li>
502 /// <li>
503 /// <p>You want to create a volume that is initialized at the default rate.</p></li>
504 /// </ul>
505 /// <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>
506 /// <p>Valid range: 100 - 300 MiB/s</p>
507 pub fn set_volume_initialization_rate(mut self, input: ::std::option::Option<i32>) -> Self {
508 self.inner = self.inner.set_volume_initialization_rate(input);
509 self
510 }
511 /// <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>
512 /// <p>This parameter is supported only for volumes created from snapshots. Omit this parameter if:</p>
513 /// <ul>
514 /// <li>
515 /// <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>
516 /// <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>
517 /// </note></li>
518 /// <li>
519 /// <p>You want to create a volume that is initialized at the default rate.</p></li>
520 /// </ul>
521 /// <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>
522 /// <p>Valid range: 100 - 300 MiB/s</p>
523 pub fn get_volume_initialization_rate(&self) -> &::std::option::Option<i32> {
524 self.inner.get_volume_initialization_rate()
525 }
526 /// <p>Reserved for internal use.</p>
527 pub fn operator(mut self, input: crate::types::OperatorRequest) -> Self {
528 self.inner = self.inner.operator(input);
529 self
530 }
531 /// <p>Reserved for internal use.</p>
532 pub fn set_operator(mut self, input: ::std::option::Option<crate::types::OperatorRequest>) -> Self {
533 self.inner = self.inner.set_operator(input);
534 self
535 }
536 /// <p>Reserved for internal use.</p>
537 pub fn get_operator(&self) -> &::std::option::Option<crate::types::OperatorRequest> {
538 self.inner.get_operator()
539 }
540 /// <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>
541 pub fn dry_run(mut self, input: bool) -> Self {
542 self.inner = self.inner.dry_run(input);
543 self
544 }
545 /// <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>
546 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
547 self.inner = self.inner.set_dry_run(input);
548 self
549 }
550 /// <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>
551 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
552 self.inner.get_dry_run()
553 }
554}