aws_sdk_ec2/operation/create_snapshot/_create_snapshot_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes a snapshot.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateSnapshotOutput {
7 /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
8 pub owner_alias: ::std::option::Option<::std::string::String>,
9 /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
10 pub outpost_arn: ::std::option::Option<::std::string::String>,
11 /// <p>Any tags assigned to the snapshot.</p>
12 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
13 /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
14 pub storage_tier: ::std::option::Option<crate::types::StorageTier>,
15 /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
16 pub restore_expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
17 /// <p>Reserved for future use.</p>
18 pub sse_type: ::std::option::Option<crate::types::SseType>,
19 /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
20 pub availability_zone: ::std::option::Option<::std::string::String>,
21 /// <note>
22 /// <p>Only for snapshot copies.</p>
23 /// </note>
24 /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
25 /// <ul>
26 /// <li>
27 /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
28 /// <li>
29 /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
30 /// </ul>
31 pub transfer_type: ::std::option::Option<crate::types::TransferType>,
32 /// <note>
33 /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
34 /// </note>
35 /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
36 pub completion_duration_minutes: ::std::option::Option<i32>,
37 /// <p>The time stamp when the snapshot was completed.</p>
38 pub completion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
39 /// <p>The full size of the snapshot, in bytes.</p><important>
40 /// <p>This is <b>not</b> the incremental size of the snapshot. This is the full snapshot size and represents the size of all the blocks that were written to the source volume at the time the snapshot was created.</p>
41 /// </important>
42 pub full_snapshot_size_in_bytes: ::std::option::Option<i64>,
43 /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
44 pub snapshot_id: ::std::option::Option<::std::string::String>,
45 /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by a copy snapshot operation have an arbitrary volume ID that you should not use for any purpose.</p>
46 pub volume_id: ::std::option::Option<::std::string::String>,
47 /// <p>The snapshot state.</p>
48 pub state: ::std::option::Option<crate::types::SnapshotState>,
49 /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
50 pub state_message: ::std::option::Option<::std::string::String>,
51 /// <p>The time stamp when the snapshot was initiated.</p>
52 pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
53 /// <p>The progress of the snapshot, as a percentage.</p>
54 pub progress: ::std::option::Option<::std::string::String>,
55 /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
56 pub owner_id: ::std::option::Option<::std::string::String>,
57 /// <p>The description for the snapshot.</p>
58 pub description: ::std::option::Option<::std::string::String>,
59 /// <p>The size of the volume, in GiB.</p>
60 pub volume_size: ::std::option::Option<i32>,
61 /// <p>Indicates whether the snapshot is encrypted.</p>
62 pub encrypted: ::std::option::Option<bool>,
63 /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</p>
64 pub kms_key_id: ::std::option::Option<::std::string::String>,
65 /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
66 pub data_encryption_key_id: ::std::option::Option<::std::string::String>,
67 _request_id: Option<String>,
68}
69impl CreateSnapshotOutput {
70 /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
71 pub fn owner_alias(&self) -> ::std::option::Option<&str> {
72 self.owner_alias.as_deref()
73 }
74 /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
75 pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
76 self.outpost_arn.as_deref()
77 }
78 /// <p>Any tags assigned to the snapshot.</p>
79 ///
80 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
81 pub fn tags(&self) -> &[crate::types::Tag] {
82 self.tags.as_deref().unwrap_or_default()
83 }
84 /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
85 pub fn storage_tier(&self) -> ::std::option::Option<&crate::types::StorageTier> {
86 self.storage_tier.as_ref()
87 }
88 /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
89 pub fn restore_expiry_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
90 self.restore_expiry_time.as_ref()
91 }
92 /// <p>Reserved for future use.</p>
93 pub fn sse_type(&self) -> ::std::option::Option<&crate::types::SseType> {
94 self.sse_type.as_ref()
95 }
96 /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
97 pub fn availability_zone(&self) -> ::std::option::Option<&str> {
98 self.availability_zone.as_deref()
99 }
100 /// <note>
101 /// <p>Only for snapshot copies.</p>
102 /// </note>
103 /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
104 /// <ul>
105 /// <li>
106 /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
107 /// <li>
108 /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
109 /// </ul>
110 pub fn transfer_type(&self) -> ::std::option::Option<&crate::types::TransferType> {
111 self.transfer_type.as_ref()
112 }
113 /// <note>
114 /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
115 /// </note>
116 /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
117 pub fn completion_duration_minutes(&self) -> ::std::option::Option<i32> {
118 self.completion_duration_minutes
119 }
120 /// <p>The time stamp when the snapshot was completed.</p>
121 pub fn completion_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
122 self.completion_time.as_ref()
123 }
124 /// <p>The full size of the snapshot, in bytes.</p><important>
125 /// <p>This is <b>not</b> the incremental size of the snapshot. This is the full snapshot size and represents the size of all the blocks that were written to the source volume at the time the snapshot was created.</p>
126 /// </important>
127 pub fn full_snapshot_size_in_bytes(&self) -> ::std::option::Option<i64> {
128 self.full_snapshot_size_in_bytes
129 }
130 /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
131 pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
132 self.snapshot_id.as_deref()
133 }
134 /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by a copy snapshot operation have an arbitrary volume ID that you should not use for any purpose.</p>
135 pub fn volume_id(&self) -> ::std::option::Option<&str> {
136 self.volume_id.as_deref()
137 }
138 /// <p>The snapshot state.</p>
139 pub fn state(&self) -> ::std::option::Option<&crate::types::SnapshotState> {
140 self.state.as_ref()
141 }
142 /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
143 pub fn state_message(&self) -> ::std::option::Option<&str> {
144 self.state_message.as_deref()
145 }
146 /// <p>The time stamp when the snapshot was initiated.</p>
147 pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
148 self.start_time.as_ref()
149 }
150 /// <p>The progress of the snapshot, as a percentage.</p>
151 pub fn progress(&self) -> ::std::option::Option<&str> {
152 self.progress.as_deref()
153 }
154 /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
155 pub fn owner_id(&self) -> ::std::option::Option<&str> {
156 self.owner_id.as_deref()
157 }
158 /// <p>The description for the snapshot.</p>
159 pub fn description(&self) -> ::std::option::Option<&str> {
160 self.description.as_deref()
161 }
162 /// <p>The size of the volume, in GiB.</p>
163 pub fn volume_size(&self) -> ::std::option::Option<i32> {
164 self.volume_size
165 }
166 /// <p>Indicates whether the snapshot is encrypted.</p>
167 pub fn encrypted(&self) -> ::std::option::Option<bool> {
168 self.encrypted
169 }
170 /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</p>
171 pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
172 self.kms_key_id.as_deref()
173 }
174 /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
175 pub fn data_encryption_key_id(&self) -> ::std::option::Option<&str> {
176 self.data_encryption_key_id.as_deref()
177 }
178}
179impl ::aws_types::request_id::RequestId for CreateSnapshotOutput {
180 fn request_id(&self) -> Option<&str> {
181 self._request_id.as_deref()
182 }
183}
184impl CreateSnapshotOutput {
185 /// Creates a new builder-style object to manufacture [`CreateSnapshotOutput`](crate::operation::create_snapshot::CreateSnapshotOutput).
186 pub fn builder() -> crate::operation::create_snapshot::builders::CreateSnapshotOutputBuilder {
187 crate::operation::create_snapshot::builders::CreateSnapshotOutputBuilder::default()
188 }
189}
190
191/// A builder for [`CreateSnapshotOutput`](crate::operation::create_snapshot::CreateSnapshotOutput).
192#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
193#[non_exhaustive]
194pub struct CreateSnapshotOutputBuilder {
195 pub(crate) owner_alias: ::std::option::Option<::std::string::String>,
196 pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
197 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
198 pub(crate) storage_tier: ::std::option::Option<crate::types::StorageTier>,
199 pub(crate) restore_expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
200 pub(crate) sse_type: ::std::option::Option<crate::types::SseType>,
201 pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
202 pub(crate) transfer_type: ::std::option::Option<crate::types::TransferType>,
203 pub(crate) completion_duration_minutes: ::std::option::Option<i32>,
204 pub(crate) completion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
205 pub(crate) full_snapshot_size_in_bytes: ::std::option::Option<i64>,
206 pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
207 pub(crate) volume_id: ::std::option::Option<::std::string::String>,
208 pub(crate) state: ::std::option::Option<crate::types::SnapshotState>,
209 pub(crate) state_message: ::std::option::Option<::std::string::String>,
210 pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
211 pub(crate) progress: ::std::option::Option<::std::string::String>,
212 pub(crate) owner_id: ::std::option::Option<::std::string::String>,
213 pub(crate) description: ::std::option::Option<::std::string::String>,
214 pub(crate) volume_size: ::std::option::Option<i32>,
215 pub(crate) encrypted: ::std::option::Option<bool>,
216 pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
217 pub(crate) data_encryption_key_id: ::std::option::Option<::std::string::String>,
218 _request_id: Option<String>,
219}
220impl CreateSnapshotOutputBuilder {
221 /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
222 pub fn owner_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.owner_alias = ::std::option::Option::Some(input.into());
224 self
225 }
226 /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
227 pub fn set_owner_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.owner_alias = input;
229 self
230 }
231 /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
232 pub fn get_owner_alias(&self) -> &::std::option::Option<::std::string::String> {
233 &self.owner_alias
234 }
235 /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
236 pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237 self.outpost_arn = ::std::option::Option::Some(input.into());
238 self
239 }
240 /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
241 pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242 self.outpost_arn = input;
243 self
244 }
245 /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
246 pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
247 &self.outpost_arn
248 }
249 /// Appends an item to `tags`.
250 ///
251 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
252 ///
253 /// <p>Any tags assigned to the snapshot.</p>
254 pub fn tags(mut self, input: crate::types::Tag) -> Self {
255 let mut v = self.tags.unwrap_or_default();
256 v.push(input);
257 self.tags = ::std::option::Option::Some(v);
258 self
259 }
260 /// <p>Any tags assigned to the snapshot.</p>
261 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
262 self.tags = input;
263 self
264 }
265 /// <p>Any tags assigned to the snapshot.</p>
266 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
267 &self.tags
268 }
269 /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
270 pub fn storage_tier(mut self, input: crate::types::StorageTier) -> Self {
271 self.storage_tier = ::std::option::Option::Some(input);
272 self
273 }
274 /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
275 pub fn set_storage_tier(mut self, input: ::std::option::Option<crate::types::StorageTier>) -> Self {
276 self.storage_tier = input;
277 self
278 }
279 /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
280 pub fn get_storage_tier(&self) -> &::std::option::Option<crate::types::StorageTier> {
281 &self.storage_tier
282 }
283 /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
284 pub fn restore_expiry_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
285 self.restore_expiry_time = ::std::option::Option::Some(input);
286 self
287 }
288 /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
289 pub fn set_restore_expiry_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
290 self.restore_expiry_time = input;
291 self
292 }
293 /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
294 pub fn get_restore_expiry_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
295 &self.restore_expiry_time
296 }
297 /// <p>Reserved for future use.</p>
298 pub fn sse_type(mut self, input: crate::types::SseType) -> Self {
299 self.sse_type = ::std::option::Option::Some(input);
300 self
301 }
302 /// <p>Reserved for future use.</p>
303 pub fn set_sse_type(mut self, input: ::std::option::Option<crate::types::SseType>) -> Self {
304 self.sse_type = input;
305 self
306 }
307 /// <p>Reserved for future use.</p>
308 pub fn get_sse_type(&self) -> &::std::option::Option<crate::types::SseType> {
309 &self.sse_type
310 }
311 /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
312 pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
313 self.availability_zone = ::std::option::Option::Some(input.into());
314 self
315 }
316 /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
317 pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
318 self.availability_zone = input;
319 self
320 }
321 /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
322 pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
323 &self.availability_zone
324 }
325 /// <note>
326 /// <p>Only for snapshot copies.</p>
327 /// </note>
328 /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
329 /// <ul>
330 /// <li>
331 /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
332 /// <li>
333 /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
334 /// </ul>
335 pub fn transfer_type(mut self, input: crate::types::TransferType) -> Self {
336 self.transfer_type = ::std::option::Option::Some(input);
337 self
338 }
339 /// <note>
340 /// <p>Only for snapshot copies.</p>
341 /// </note>
342 /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
343 /// <ul>
344 /// <li>
345 /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
346 /// <li>
347 /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
348 /// </ul>
349 pub fn set_transfer_type(mut self, input: ::std::option::Option<crate::types::TransferType>) -> Self {
350 self.transfer_type = input;
351 self
352 }
353 /// <note>
354 /// <p>Only for snapshot copies.</p>
355 /// </note>
356 /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
357 /// <ul>
358 /// <li>
359 /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
360 /// <li>
361 /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
362 /// </ul>
363 pub fn get_transfer_type(&self) -> &::std::option::Option<crate::types::TransferType> {
364 &self.transfer_type
365 }
366 /// <note>
367 /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
368 /// </note>
369 /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
370 pub fn completion_duration_minutes(mut self, input: i32) -> Self {
371 self.completion_duration_minutes = ::std::option::Option::Some(input);
372 self
373 }
374 /// <note>
375 /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
376 /// </note>
377 /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
378 pub fn set_completion_duration_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
379 self.completion_duration_minutes = input;
380 self
381 }
382 /// <note>
383 /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
384 /// </note>
385 /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
386 pub fn get_completion_duration_minutes(&self) -> &::std::option::Option<i32> {
387 &self.completion_duration_minutes
388 }
389 /// <p>The time stamp when the snapshot was completed.</p>
390 pub fn completion_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
391 self.completion_time = ::std::option::Option::Some(input);
392 self
393 }
394 /// <p>The time stamp when the snapshot was completed.</p>
395 pub fn set_completion_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
396 self.completion_time = input;
397 self
398 }
399 /// <p>The time stamp when the snapshot was completed.</p>
400 pub fn get_completion_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
401 &self.completion_time
402 }
403 /// <p>The full size of the snapshot, in bytes.</p><important>
404 /// <p>This is <b>not</b> the incremental size of the snapshot. This is the full snapshot size and represents the size of all the blocks that were written to the source volume at the time the snapshot was created.</p>
405 /// </important>
406 pub fn full_snapshot_size_in_bytes(mut self, input: i64) -> Self {
407 self.full_snapshot_size_in_bytes = ::std::option::Option::Some(input);
408 self
409 }
410 /// <p>The full size of the snapshot, in bytes.</p><important>
411 /// <p>This is <b>not</b> the incremental size of the snapshot. This is the full snapshot size and represents the size of all the blocks that were written to the source volume at the time the snapshot was created.</p>
412 /// </important>
413 pub fn set_full_snapshot_size_in_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
414 self.full_snapshot_size_in_bytes = input;
415 self
416 }
417 /// <p>The full size of the snapshot, in bytes.</p><important>
418 /// <p>This is <b>not</b> the incremental size of the snapshot. This is the full snapshot size and represents the size of all the blocks that were written to the source volume at the time the snapshot was created.</p>
419 /// </important>
420 pub fn get_full_snapshot_size_in_bytes(&self) -> &::std::option::Option<i64> {
421 &self.full_snapshot_size_in_bytes
422 }
423 /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
424 pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
425 self.snapshot_id = ::std::option::Option::Some(input.into());
426 self
427 }
428 /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
429 pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
430 self.snapshot_id = input;
431 self
432 }
433 /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
434 pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
435 &self.snapshot_id
436 }
437 /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by a copy snapshot operation have an arbitrary volume ID that you should not use for any purpose.</p>
438 pub fn volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
439 self.volume_id = ::std::option::Option::Some(input.into());
440 self
441 }
442 /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by a copy snapshot operation have an arbitrary volume ID that you should not use for any purpose.</p>
443 pub fn set_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
444 self.volume_id = input;
445 self
446 }
447 /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by a copy snapshot operation have an arbitrary volume ID that you should not use for any purpose.</p>
448 pub fn get_volume_id(&self) -> &::std::option::Option<::std::string::String> {
449 &self.volume_id
450 }
451 /// <p>The snapshot state.</p>
452 pub fn state(mut self, input: crate::types::SnapshotState) -> Self {
453 self.state = ::std::option::Option::Some(input);
454 self
455 }
456 /// <p>The snapshot state.</p>
457 pub fn set_state(mut self, input: ::std::option::Option<crate::types::SnapshotState>) -> Self {
458 self.state = input;
459 self
460 }
461 /// <p>The snapshot state.</p>
462 pub fn get_state(&self) -> &::std::option::Option<crate::types::SnapshotState> {
463 &self.state
464 }
465 /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
466 pub fn state_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
467 self.state_message = ::std::option::Option::Some(input.into());
468 self
469 }
470 /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
471 pub fn set_state_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
472 self.state_message = input;
473 self
474 }
475 /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
476 pub fn get_state_message(&self) -> &::std::option::Option<::std::string::String> {
477 &self.state_message
478 }
479 /// <p>The time stamp when the snapshot was initiated.</p>
480 pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
481 self.start_time = ::std::option::Option::Some(input);
482 self
483 }
484 /// <p>The time stamp when the snapshot was initiated.</p>
485 pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
486 self.start_time = input;
487 self
488 }
489 /// <p>The time stamp when the snapshot was initiated.</p>
490 pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
491 &self.start_time
492 }
493 /// <p>The progress of the snapshot, as a percentage.</p>
494 pub fn progress(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
495 self.progress = ::std::option::Option::Some(input.into());
496 self
497 }
498 /// <p>The progress of the snapshot, as a percentage.</p>
499 pub fn set_progress(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
500 self.progress = input;
501 self
502 }
503 /// <p>The progress of the snapshot, as a percentage.</p>
504 pub fn get_progress(&self) -> &::std::option::Option<::std::string::String> {
505 &self.progress
506 }
507 /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
508 pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
509 self.owner_id = ::std::option::Option::Some(input.into());
510 self
511 }
512 /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
513 pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
514 self.owner_id = input;
515 self
516 }
517 /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
518 pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
519 &self.owner_id
520 }
521 /// <p>The description for the snapshot.</p>
522 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
523 self.description = ::std::option::Option::Some(input.into());
524 self
525 }
526 /// <p>The description for the snapshot.</p>
527 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
528 self.description = input;
529 self
530 }
531 /// <p>The description for the snapshot.</p>
532 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
533 &self.description
534 }
535 /// <p>The size of the volume, in GiB.</p>
536 pub fn volume_size(mut self, input: i32) -> Self {
537 self.volume_size = ::std::option::Option::Some(input);
538 self
539 }
540 /// <p>The size of the volume, in GiB.</p>
541 pub fn set_volume_size(mut self, input: ::std::option::Option<i32>) -> Self {
542 self.volume_size = input;
543 self
544 }
545 /// <p>The size of the volume, in GiB.</p>
546 pub fn get_volume_size(&self) -> &::std::option::Option<i32> {
547 &self.volume_size
548 }
549 /// <p>Indicates whether the snapshot is encrypted.</p>
550 pub fn encrypted(mut self, input: bool) -> Self {
551 self.encrypted = ::std::option::Option::Some(input);
552 self
553 }
554 /// <p>Indicates whether the snapshot is encrypted.</p>
555 pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
556 self.encrypted = input;
557 self
558 }
559 /// <p>Indicates whether the snapshot is encrypted.</p>
560 pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
561 &self.encrypted
562 }
563 /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</p>
564 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
565 self.kms_key_id = ::std::option::Option::Some(input.into());
566 self
567 }
568 /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</p>
569 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
570 self.kms_key_id = input;
571 self
572 }
573 /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</p>
574 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
575 &self.kms_key_id
576 }
577 /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
578 pub fn data_encryption_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
579 self.data_encryption_key_id = ::std::option::Option::Some(input.into());
580 self
581 }
582 /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
583 pub fn set_data_encryption_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
584 self.data_encryption_key_id = input;
585 self
586 }
587 /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
588 pub fn get_data_encryption_key_id(&self) -> &::std::option::Option<::std::string::String> {
589 &self.data_encryption_key_id
590 }
591 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
592 self._request_id = Some(request_id.into());
593 self
594 }
595
596 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
597 self._request_id = request_id;
598 self
599 }
600 /// Consumes the builder and constructs a [`CreateSnapshotOutput`](crate::operation::create_snapshot::CreateSnapshotOutput).
601 pub fn build(self) -> crate::operation::create_snapshot::CreateSnapshotOutput {
602 crate::operation::create_snapshot::CreateSnapshotOutput {
603 owner_alias: self.owner_alias,
604 outpost_arn: self.outpost_arn,
605 tags: self.tags,
606 storage_tier: self.storage_tier,
607 restore_expiry_time: self.restore_expiry_time,
608 sse_type: self.sse_type,
609 availability_zone: self.availability_zone,
610 transfer_type: self.transfer_type,
611 completion_duration_minutes: self.completion_duration_minutes,
612 completion_time: self.completion_time,
613 full_snapshot_size_in_bytes: self.full_snapshot_size_in_bytes,
614 snapshot_id: self.snapshot_id,
615 volume_id: self.volume_id,
616 state: self.state,
617 state_message: self.state_message,
618 start_time: self.start_time,
619 progress: self.progress,
620 owner_id: self.owner_id,
621 description: self.description,
622 volume_size: self.volume_size,
623 encrypted: self.encrypted,
624 kms_key_id: self.kms_key_id,
625 data_encryption_key_id: self.data_encryption_key_id,
626 _request_id: self._request_id,
627 }
628 }
629}