aws_sdk_ec2/operation/copy_snapshot/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::copy_snapshot::_copy_snapshot_output::CopySnapshotOutputBuilder;
3
4pub use crate::operation::copy_snapshot::_copy_snapshot_input::CopySnapshotInputBuilder;
5
6impl crate::operation::copy_snapshot::builders::CopySnapshotInputBuilder {
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::copy_snapshot::CopySnapshotOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::copy_snapshot::CopySnapshotError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.copy_snapshot();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CopySnapshot`.
24///
25/// <p>Creates an exact copy of an Amazon EBS snapshot.</p>
26/// <p>The location of the source snapshot determines whether you can copy it or not, and the allowed destinations for the snapshot copy.</p>
27/// <ul>
28/// <li>
29/// <p>If the source snapshot is in a Region, you can copy it within that Region, to another Region, to an Outpost associated with that Region, or to a Local Zone in that Region.</p></li>
30/// <li>
31/// <p>If the source snapshot is in a Local Zone, you can copy it within that Local Zone, to another Local Zone in the same zone group, or to the parent Region of the Local Zone.</p></li>
32/// <li>
33/// <p>If the source snapshot is on an Outpost, you can't copy it.</p></li>
34/// </ul>
35/// <p>When copying snapshots to a Region, the encryption outcome for the snapshot copy depends on the Amazon EBS encryption by default setting for the destination Region, the encryption status of the source snapshot, and the encryption parameters you specify in the request. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-copy-snapshot.html#creating-encrypted-snapshots"> Encryption and snapshot copying</a>.</p>
36/// <p>Snapshots copied to an Outpost must be encrypted. Unencrypted snapshots are not supported on Outposts. For more information, <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#considerations"> Amazon EBS local snapshots on Outposts</a>.</p><note>
37/// <p>Snapshots copies have an arbitrary source volume ID. Do not use this volume ID for any purpose.</p>
38/// </note>
39/// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-copy-snapshot.html">Copy an Amazon EBS snapshot</a> in the <i>Amazon EBS User Guide</i>.</p>
40#[derive(::std::clone::Clone, ::std::fmt::Debug)]
41pub struct CopySnapshotFluentBuilder {
42 handle: ::std::sync::Arc<crate::client::Handle>,
43 inner: crate::operation::copy_snapshot::builders::CopySnapshotInputBuilder,
44 config_override: ::std::option::Option<crate::config::Builder>,
45}
46impl
47 crate::client::customize::internal::CustomizableSend<
48 crate::operation::copy_snapshot::CopySnapshotOutput,
49 crate::operation::copy_snapshot::CopySnapshotError,
50 > for CopySnapshotFluentBuilder
51{
52 fn send(
53 self,
54 config_override: crate::config::Builder,
55 ) -> crate::client::customize::internal::BoxFuture<
56 crate::client::customize::internal::SendResult<
57 crate::operation::copy_snapshot::CopySnapshotOutput,
58 crate::operation::copy_snapshot::CopySnapshotError,
59 >,
60 > {
61 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
62 }
63}
64impl CopySnapshotFluentBuilder {
65 /// Creates a new `CopySnapshotFluentBuilder`.
66 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
67 Self {
68 handle,
69 inner: ::std::default::Default::default(),
70 config_override: ::std::option::Option::None,
71 }
72 }
73 /// Access the CopySnapshot as a reference.
74 pub fn as_input(&self) -> &crate::operation::copy_snapshot::builders::CopySnapshotInputBuilder {
75 &self.inner
76 }
77 /// Sends the request and returns the response.
78 ///
79 /// If an error occurs, an `SdkError` will be returned with additional details that
80 /// can be matched against.
81 ///
82 /// By default, any retryable failures will be retried twice. Retry behavior
83 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
84 /// set when configuring the client.
85 pub async fn send(
86 self,
87 ) -> ::std::result::Result<
88 crate::operation::copy_snapshot::CopySnapshotOutput,
89 ::aws_smithy_runtime_api::client::result::SdkError<
90 crate::operation::copy_snapshot::CopySnapshotError,
91 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
92 >,
93 > {
94 let input = self
95 .inner
96 .build()
97 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
98 let runtime_plugins = crate::operation::copy_snapshot::CopySnapshot::operation_runtime_plugins(
99 self.handle.runtime_plugins.clone(),
100 &self.handle.conf,
101 self.config_override,
102 );
103 crate::operation::copy_snapshot::CopySnapshot::orchestrate(&runtime_plugins, input).await
104 }
105
106 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
107 pub fn customize(
108 self,
109 ) -> crate::client::customize::CustomizableOperation<
110 crate::operation::copy_snapshot::CopySnapshotOutput,
111 crate::operation::copy_snapshot::CopySnapshotError,
112 Self,
113 > {
114 crate::client::customize::CustomizableOperation::new(self)
115 }
116 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
117 self.set_config_override(::std::option::Option::Some(config_override.into()));
118 self
119 }
120
121 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
122 self.config_override = config_override;
123 self
124 }
125 /// <p>A description for the EBS snapshot.</p>
126 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.description(input.into());
128 self
129 }
130 /// <p>A description for the EBS snapshot.</p>
131 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_description(input);
133 self
134 }
135 /// <p>A description for the EBS snapshot.</p>
136 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_description()
138 }
139 /// <p>The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot.</p><note>
140 /// <p>Only supported when copying a snapshot to an Outpost.</p>
141 /// </note>
142 /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#copy-snapshots"> Copy snapshots from an Amazon Web Services Region to an Outpost</a> in the <i>Amazon EBS User Guide</i>.</p>
143 pub fn destination_outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144 self.inner = self.inner.destination_outpost_arn(input.into());
145 self
146 }
147 /// <p>The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot.</p><note>
148 /// <p>Only supported when copying a snapshot to an Outpost.</p>
149 /// </note>
150 /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#copy-snapshots"> Copy snapshots from an Amazon Web Services Region to an Outpost</a> in the <i>Amazon EBS User Guide</i>.</p>
151 pub fn set_destination_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152 self.inner = self.inner.set_destination_outpost_arn(input);
153 self
154 }
155 /// <p>The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot.</p><note>
156 /// <p>Only supported when copying a snapshot to an Outpost.</p>
157 /// </note>
158 /// <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#copy-snapshots"> Copy snapshots from an Amazon Web Services Region to an Outpost</a> in the <i>Amazon EBS User Guide</i>.</p>
159 pub fn get_destination_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
160 self.inner.get_destination_outpost_arn()
161 }
162 /// <p>The destination Region to use in the <code>PresignedUrl</code> parameter of a snapshot copy operation. This parameter is only valid for specifying the destination Region in a <code>PresignedUrl</code> parameter, where it is required.</p>
163 /// <p>The snapshot copy is sent to the regional endpoint that you sent the HTTP request to (for example, <code>ec2.us-east-1.amazonaws.com</code>). With the CLI, this is specified using the <code>--region</code> parameter or the default Region in your Amazon Web Services configuration file.</p>
164 pub fn destination_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165 self.inner = self.inner.destination_region(input.into());
166 self
167 }
168 /// <p>The destination Region to use in the <code>PresignedUrl</code> parameter of a snapshot copy operation. This parameter is only valid for specifying the destination Region in a <code>PresignedUrl</code> parameter, where it is required.</p>
169 /// <p>The snapshot copy is sent to the regional endpoint that you sent the HTTP request to (for example, <code>ec2.us-east-1.amazonaws.com</code>). With the CLI, this is specified using the <code>--region</code> parameter or the default Region in your Amazon Web Services configuration file.</p>
170 pub fn set_destination_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171 self.inner = self.inner.set_destination_region(input);
172 self
173 }
174 /// <p>The destination Region to use in the <code>PresignedUrl</code> parameter of a snapshot copy operation. This parameter is only valid for specifying the destination Region in a <code>PresignedUrl</code> parameter, where it is required.</p>
175 /// <p>The snapshot copy is sent to the regional endpoint that you sent the HTTP request to (for example, <code>ec2.us-east-1.amazonaws.com</code>). With the CLI, this is specified using the <code>--region</code> parameter or the default Region in your Amazon Web Services configuration file.</p>
176 pub fn get_destination_region(&self) -> &::std::option::Option<::std::string::String> {
177 self.inner.get_destination_region()
178 }
179 /// <p>To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Otherwise, omit this parameter. Copies of encrypted snapshots are encrypted, even if you omit this parameter and encryption by default is not enabled. You cannot set this parameter to false. 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>
180 pub fn encrypted(mut self, input: bool) -> Self {
181 self.inner = self.inner.encrypted(input);
182 self
183 }
184 /// <p>To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Otherwise, omit this parameter. Copies of encrypted snapshots are encrypted, even if you omit this parameter and encryption by default is not enabled. You cannot set this parameter to false. 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>
185 pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
186 self.inner = self.inner.set_encrypted(input);
187 self
188 }
189 /// <p>To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Otherwise, omit this parameter. Copies of encrypted snapshots are encrypted, even if you omit this parameter and encryption by default is not enabled. You cannot set this parameter to false. 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>
190 pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
191 self.inner.get_encrypted()
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>When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a pre-signed URL. This parameter is optional for unencrypted snapshots. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html">Query requests</a>.</p>
244 /// <p>The <code>PresignedUrl</code> should use the snapshot source endpoint, the <code>CopySnapshot</code> action, and include the <code>SourceRegion</code>, <code>SourceSnapshotId</code>, and <code>DestinationRegion</code> parameters. The <code>PresignedUrl</code> must be signed using Amazon Web Services Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html"> Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API Reference</i>. An invalid or improperly signed <code>PresignedUrl</code> will cause the copy operation to fail asynchronously, and the snapshot will move to an <code>error</code> state.</p>
245 pub fn presigned_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
246 self.inner = self.inner.presigned_url(input.into());
247 self
248 }
249 /// <p>When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a pre-signed URL. This parameter is optional for unencrypted snapshots. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html">Query requests</a>.</p>
250 /// <p>The <code>PresignedUrl</code> should use the snapshot source endpoint, the <code>CopySnapshot</code> action, and include the <code>SourceRegion</code>, <code>SourceSnapshotId</code>, and <code>DestinationRegion</code> parameters. The <code>PresignedUrl</code> must be signed using Amazon Web Services Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html"> Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API Reference</i>. An invalid or improperly signed <code>PresignedUrl</code> will cause the copy operation to fail asynchronously, and the snapshot will move to an <code>error</code> state.</p>
251 pub fn set_presigned_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252 self.inner = self.inner.set_presigned_url(input);
253 self
254 }
255 /// <p>When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a pre-signed URL. This parameter is optional for unencrypted snapshots. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html">Query requests</a>.</p>
256 /// <p>The <code>PresignedUrl</code> should use the snapshot source endpoint, the <code>CopySnapshot</code> action, and include the <code>SourceRegion</code>, <code>SourceSnapshotId</code>, and <code>DestinationRegion</code> parameters. The <code>PresignedUrl</code> must be signed using Amazon Web Services Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html"> Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API Reference</i>. An invalid or improperly signed <code>PresignedUrl</code> will cause the copy operation to fail asynchronously, and the snapshot will move to an <code>error</code> state.</p>
257 pub fn get_presigned_url(&self) -> &::std::option::Option<::std::string::String> {
258 self.inner.get_presigned_url()
259 }
260 /// <p>The ID of the Region that contains the snapshot to be copied.</p>
261 pub fn source_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
262 self.inner = self.inner.source_region(input.into());
263 self
264 }
265 /// <p>The ID of the Region that contains the snapshot to be copied.</p>
266 pub fn set_source_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
267 self.inner = self.inner.set_source_region(input);
268 self
269 }
270 /// <p>The ID of the Region that contains the snapshot to be copied.</p>
271 pub fn get_source_region(&self) -> &::std::option::Option<::std::string::String> {
272 self.inner.get_source_region()
273 }
274 /// <p>The ID of the EBS snapshot to copy.</p>
275 pub fn source_snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
276 self.inner = self.inner.source_snapshot_id(input.into());
277 self
278 }
279 /// <p>The ID of the EBS snapshot to copy.</p>
280 pub fn set_source_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
281 self.inner = self.inner.set_source_snapshot_id(input);
282 self
283 }
284 /// <p>The ID of the EBS snapshot to copy.</p>
285 pub fn get_source_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
286 self.inner.get_source_snapshot_id()
287 }
288 ///
289 /// Appends an item to `TagSpecifications`.
290 ///
291 /// To override the contents of this collection use [`set_tag_specifications`](Self::set_tag_specifications).
292 ///
293 /// <p>The tags to apply to the new snapshot.</p>
294 pub fn tag_specifications(mut self, input: crate::types::TagSpecification) -> Self {
295 self.inner = self.inner.tag_specifications(input);
296 self
297 }
298 /// <p>The tags to apply to the new snapshot.</p>
299 pub fn set_tag_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>>) -> Self {
300 self.inner = self.inner.set_tag_specifications(input);
301 self
302 }
303 /// <p>The tags to apply to the new snapshot.</p>
304 pub fn get_tag_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagSpecification>> {
305 self.inner.get_tag_specifications()
306 }
307 /// <note>
308 /// <p>Not supported when copying snapshots to or from Local Zones or Outposts.</p>
309 /// </note>
310 /// <p>Specify a completion duration, in 15 minute increments, to initiate a time-based snapshot copy. Time-based snapshot copy operations complete within the specified duration. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/time-based-copies.html"> Time-based copies</a>.</p>
311 /// <p>If you do not specify a value, the snapshot copy operation is completed on a best-effort basis.</p>
312 pub fn completion_duration_minutes(mut self, input: i32) -> Self {
313 self.inner = self.inner.completion_duration_minutes(input);
314 self
315 }
316 /// <note>
317 /// <p>Not supported when copying snapshots to or from Local Zones or Outposts.</p>
318 /// </note>
319 /// <p>Specify a completion duration, in 15 minute increments, to initiate a time-based snapshot copy. Time-based snapshot copy operations complete within the specified duration. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/time-based-copies.html"> Time-based copies</a>.</p>
320 /// <p>If you do not specify a value, the snapshot copy operation is completed on a best-effort basis.</p>
321 pub fn set_completion_duration_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
322 self.inner = self.inner.set_completion_duration_minutes(input);
323 self
324 }
325 /// <note>
326 /// <p>Not supported when copying snapshots to or from Local Zones or Outposts.</p>
327 /// </note>
328 /// <p>Specify a completion duration, in 15 minute increments, to initiate a time-based snapshot copy. Time-based snapshot copy operations complete within the specified duration. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/time-based-copies.html"> Time-based copies</a>.</p>
329 /// <p>If you do not specify a value, the snapshot copy operation is completed on a best-effort basis.</p>
330 pub fn get_completion_duration_minutes(&self) -> &::std::option::Option<i32> {
331 self.inner.get_completion_duration_minutes()
332 }
333 /// <p>The Local Zone, for example, <code>cn-north-1-pkx-1a</code> to which to copy the snapshot.</p><note>
334 /// <p>Only supported when copying a snapshot to a Local Zone.</p>
335 /// </note>
336 pub fn destination_availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
337 self.inner = self.inner.destination_availability_zone(input.into());
338 self
339 }
340 /// <p>The Local Zone, for example, <code>cn-north-1-pkx-1a</code> to which to copy the snapshot.</p><note>
341 /// <p>Only supported when copying a snapshot to a Local Zone.</p>
342 /// </note>
343 pub fn set_destination_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
344 self.inner = self.inner.set_destination_availability_zone(input);
345 self
346 }
347 /// <p>The Local Zone, for example, <code>cn-north-1-pkx-1a</code> to which to copy the snapshot.</p><note>
348 /// <p>Only supported when copying a snapshot to a Local Zone.</p>
349 /// </note>
350 pub fn get_destination_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
351 self.inner.get_destination_availability_zone()
352 }
353 /// <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>
354 pub fn dry_run(mut self, input: bool) -> Self {
355 self.inner = self.inner.dry_run(input);
356 self
357 }
358 /// <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>
359 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
360 self.inner = self.inner.set_dry_run(input);
361 self
362 }
363 /// <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>
364 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
365 self.inner.get_dry_run()
366 }
367}