aws-sdk-backup 1.109.0

AWS SDK for AWS Backup
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct StartBackupJobInput {
    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.</p>
    pub backup_vault_name: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of a logically air-gapped vault. ARN must be in the same account and Region. If provided, supported fully managed resources back up directly to logically air-gapped vault, while other supported resources create a temporary (billable) snapshot in backup vault, then copy it to logically air-gapped vault. Unsupported resources only back up to the specified backup vault.</p>
    pub logically_air_gapped_backup_vault_arn: ::std::option::Option<::std::string::String>,
    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
    pub resource_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
    pub iam_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>StartBackupJob</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub idempotency_token: ::std::option::Option<::std::string::String>,
    /// <p>A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional, and the default is 8 hours. If this value is included, it must be at least 60 minutes to avoid errors.</p>
    /// <p>This parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    /// <p>During the start window, the backup job status remains in <code>CREATED</code> status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to <code>RUNNING</code>) or until the job status changes to <code>EXPIRED</code> (which is expected to occur when the start window time is over).</p>
    pub start_window_minutes: ::std::option::Option<i64>,
    /// <p>A value in minutes during which a successfully started backup must complete, or else Backup will cancel the job. This value is optional. This value begins counting down from when the backup was scheduled. It does not add additional time for <code>StartWindowMinutes</code>, or if the backup started later than scheduled.</p>
    /// <p>Like <code>StartWindowMinutes</code>, this parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    pub complete_window_minutes: ::std::option::Option<i64>,
    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup will transition and expire backups automatically according to the lifecycle that you define.</p>
    /// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.</p>
    /// <p>Resource types that can transition to cold storage are listed in the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource">Feature availability by resource</a> table. Backup ignores this expression for other resource types.</p>
    /// <p>This parameter has a maximum value of 100 years (36,500 days).</p>
    pub lifecycle: ::std::option::Option<crate::types::Lifecycle>,
    /// <p>The tags to assign to the resources.</p>
    pub recovery_point_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The backup option for a selected resource. This option is only available for Windows Volume Shadow Copy Service (VSS) backup jobs.</p>
    /// <p>Valid values: Set to <code>"WindowsVSS":"enabled"</code> to enable the <code>WindowsVSS</code> backup option and create a Windows VSS backup. Set to <code>"WindowsVSS""disabled"</code> to create a regular backup. The <code>WindowsVSS</code> option is not enabled by default.</p>
    pub backup_options: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Include this parameter to enable index creation if your backup job has a resource type that supports backup indexes.</p>
    /// <p>Resource types that support backup indexes include:</p>
    /// <ul>
    /// <li>
    /// <p><code>EBS</code> for Amazon Elastic Block Store</p></li>
    /// <li>
    /// <p><code>S3</code> for Amazon Simple Storage Service (Amazon S3)</p></li>
    /// </ul>
    /// <p>Index can have 1 of 2 possible values, either <code>ENABLED</code> or <code>DISABLED</code>.</p>
    /// <p>To create a backup index for an eligible <code>ACTIVE</code> recovery point that does not yet have a backup index, set value to <code>ENABLED</code>.</p>
    /// <p>To delete a backup index, set value to <code>DISABLED</code>.</p>
    pub index: ::std::option::Option<crate::types::Index>,
}
impl StartBackupJobInput {
    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.</p>
    pub fn backup_vault_name(&self) -> ::std::option::Option<&str> {
        self.backup_vault_name.as_deref()
    }
    /// <p>The ARN of a logically air-gapped vault. ARN must be in the same account and Region. If provided, supported fully managed resources back up directly to logically air-gapped vault, while other supported resources create a temporary (billable) snapshot in backup vault, then copy it to logically air-gapped vault. Unsupported resources only back up to the specified backup vault.</p>
    pub fn logically_air_gapped_backup_vault_arn(&self) -> ::std::option::Option<&str> {
        self.logically_air_gapped_backup_vault_arn.as_deref()
    }
    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
        self.resource_arn.as_deref()
    }
    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
    pub fn iam_role_arn(&self) -> ::std::option::Option<&str> {
        self.iam_role_arn.as_deref()
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>StartBackupJob</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn idempotency_token(&self) -> ::std::option::Option<&str> {
        self.idempotency_token.as_deref()
    }
    /// <p>A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional, and the default is 8 hours. If this value is included, it must be at least 60 minutes to avoid errors.</p>
    /// <p>This parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    /// <p>During the start window, the backup job status remains in <code>CREATED</code> status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to <code>RUNNING</code>) or until the job status changes to <code>EXPIRED</code> (which is expected to occur when the start window time is over).</p>
    pub fn start_window_minutes(&self) -> ::std::option::Option<i64> {
        self.start_window_minutes
    }
    /// <p>A value in minutes during which a successfully started backup must complete, or else Backup will cancel the job. This value is optional. This value begins counting down from when the backup was scheduled. It does not add additional time for <code>StartWindowMinutes</code>, or if the backup started later than scheduled.</p>
    /// <p>Like <code>StartWindowMinutes</code>, this parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    pub fn complete_window_minutes(&self) -> ::std::option::Option<i64> {
        self.complete_window_minutes
    }
    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup will transition and expire backups automatically according to the lifecycle that you define.</p>
    /// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.</p>
    /// <p>Resource types that can transition to cold storage are listed in the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource">Feature availability by resource</a> table. Backup ignores this expression for other resource types.</p>
    /// <p>This parameter has a maximum value of 100 years (36,500 days).</p>
    pub fn lifecycle(&self) -> ::std::option::Option<&crate::types::Lifecycle> {
        self.lifecycle.as_ref()
    }
    /// <p>The tags to assign to the resources.</p>
    pub fn recovery_point_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.recovery_point_tags.as_ref()
    }
    /// <p>The backup option for a selected resource. This option is only available for Windows Volume Shadow Copy Service (VSS) backup jobs.</p>
    /// <p>Valid values: Set to <code>"WindowsVSS":"enabled"</code> to enable the <code>WindowsVSS</code> backup option and create a Windows VSS backup. Set to <code>"WindowsVSS""disabled"</code> to create a regular backup. The <code>WindowsVSS</code> option is not enabled by default.</p>
    pub fn backup_options(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.backup_options.as_ref()
    }
    /// <p>Include this parameter to enable index creation if your backup job has a resource type that supports backup indexes.</p>
    /// <p>Resource types that support backup indexes include:</p>
    /// <ul>
    /// <li>
    /// <p><code>EBS</code> for Amazon Elastic Block Store</p></li>
    /// <li>
    /// <p><code>S3</code> for Amazon Simple Storage Service (Amazon S3)</p></li>
    /// </ul>
    /// <p>Index can have 1 of 2 possible values, either <code>ENABLED</code> or <code>DISABLED</code>.</p>
    /// <p>To create a backup index for an eligible <code>ACTIVE</code> recovery point that does not yet have a backup index, set value to <code>ENABLED</code>.</p>
    /// <p>To delete a backup index, set value to <code>DISABLED</code>.</p>
    pub fn index(&self) -> ::std::option::Option<&crate::types::Index> {
        self.index.as_ref()
    }
}
impl ::std::fmt::Debug for StartBackupJobInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartBackupJobInput");
        formatter.field("backup_vault_name", &self.backup_vault_name);
        formatter.field("logically_air_gapped_backup_vault_arn", &self.logically_air_gapped_backup_vault_arn);
        formatter.field("resource_arn", &self.resource_arn);
        formatter.field("iam_role_arn", &self.iam_role_arn);
        formatter.field("idempotency_token", &self.idempotency_token);
        formatter.field("start_window_minutes", &self.start_window_minutes);
        formatter.field("complete_window_minutes", &self.complete_window_minutes);
        formatter.field("lifecycle", &self.lifecycle);
        formatter.field("recovery_point_tags", &"*** Sensitive Data Redacted ***");
        formatter.field("backup_options", &self.backup_options);
        formatter.field("index", &self.index);
        formatter.finish()
    }
}
impl StartBackupJobInput {
    /// Creates a new builder-style object to manufacture [`StartBackupJobInput`](crate::operation::start_backup_job::StartBackupJobInput).
    pub fn builder() -> crate::operation::start_backup_job::builders::StartBackupJobInputBuilder {
        crate::operation::start_backup_job::builders::StartBackupJobInputBuilder::default()
    }
}

/// A builder for [`StartBackupJobInput`](crate::operation::start_backup_job::StartBackupJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct StartBackupJobInputBuilder {
    pub(crate) backup_vault_name: ::std::option::Option<::std::string::String>,
    pub(crate) logically_air_gapped_backup_vault_arn: ::std::option::Option<::std::string::String>,
    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
    pub(crate) iam_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) idempotency_token: ::std::option::Option<::std::string::String>,
    pub(crate) start_window_minutes: ::std::option::Option<i64>,
    pub(crate) complete_window_minutes: ::std::option::Option<i64>,
    pub(crate) lifecycle: ::std::option::Option<crate::types::Lifecycle>,
    pub(crate) recovery_point_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) backup_options: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) index: ::std::option::Option<crate::types::Index>,
}
impl StartBackupJobInputBuilder {
    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.</p>
    /// This field is required.
    pub fn backup_vault_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.backup_vault_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.</p>
    pub fn set_backup_vault_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.backup_vault_name = input;
        self
    }
    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created.</p>
    pub fn get_backup_vault_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.backup_vault_name
    }
    /// <p>The ARN of a logically air-gapped vault. ARN must be in the same account and Region. If provided, supported fully managed resources back up directly to logically air-gapped vault, while other supported resources create a temporary (billable) snapshot in backup vault, then copy it to logically air-gapped vault. Unsupported resources only back up to the specified backup vault.</p>
    pub fn logically_air_gapped_backup_vault_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.logically_air_gapped_backup_vault_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of a logically air-gapped vault. ARN must be in the same account and Region. If provided, supported fully managed resources back up directly to logically air-gapped vault, while other supported resources create a temporary (billable) snapshot in backup vault, then copy it to logically air-gapped vault. Unsupported resources only back up to the specified backup vault.</p>
    pub fn set_logically_air_gapped_backup_vault_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.logically_air_gapped_backup_vault_arn = input;
        self
    }
    /// <p>The ARN of a logically air-gapped vault. ARN must be in the same account and Region. If provided, supported fully managed resources back up directly to logically air-gapped vault, while other supported resources create a temporary (billable) snapshot in backup vault, then copy it to logically air-gapped vault. Unsupported resources only back up to the specified backup vault.</p>
    pub fn get_logically_air_gapped_backup_vault_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.logically_air_gapped_backup_vault_arn
    }
    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
    /// This field is required.
    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_arn = input;
        self
    }
    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_arn
    }
    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
    /// This field is required.
    pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.iam_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
    pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.iam_role_arn = input;
        self
    }
    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
    pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.iam_role_arn
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>StartBackupJob</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn idempotency_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.idempotency_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>StartBackupJob</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn set_idempotency_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.idempotency_token = input;
        self
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>StartBackupJob</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn get_idempotency_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.idempotency_token
    }
    /// <p>A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional, and the default is 8 hours. If this value is included, it must be at least 60 minutes to avoid errors.</p>
    /// <p>This parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    /// <p>During the start window, the backup job status remains in <code>CREATED</code> status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to <code>RUNNING</code>) or until the job status changes to <code>EXPIRED</code> (which is expected to occur when the start window time is over).</p>
    pub fn start_window_minutes(mut self, input: i64) -> Self {
        self.start_window_minutes = ::std::option::Option::Some(input);
        self
    }
    /// <p>A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional, and the default is 8 hours. If this value is included, it must be at least 60 minutes to avoid errors.</p>
    /// <p>This parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    /// <p>During the start window, the backup job status remains in <code>CREATED</code> status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to <code>RUNNING</code>) or until the job status changes to <code>EXPIRED</code> (which is expected to occur when the start window time is over).</p>
    pub fn set_start_window_minutes(mut self, input: ::std::option::Option<i64>) -> Self {
        self.start_window_minutes = input;
        self
    }
    /// <p>A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional, and the default is 8 hours. If this value is included, it must be at least 60 minutes to avoid errors.</p>
    /// <p>This parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    /// <p>During the start window, the backup job status remains in <code>CREATED</code> status until it has successfully begun or until the start window time has run out. If within the start window time Backup receives an error that allows the job to be retried, Backup will automatically retry to begin the job at least every 10 minutes until the backup successfully begins (the job status changes to <code>RUNNING</code>) or until the job status changes to <code>EXPIRED</code> (which is expected to occur when the start window time is over).</p>
    pub fn get_start_window_minutes(&self) -> &::std::option::Option<i64> {
        &self.start_window_minutes
    }
    /// <p>A value in minutes during which a successfully started backup must complete, or else Backup will cancel the job. This value is optional. This value begins counting down from when the backup was scheduled. It does not add additional time for <code>StartWindowMinutes</code>, or if the backup started later than scheduled.</p>
    /// <p>Like <code>StartWindowMinutes</code>, this parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    pub fn complete_window_minutes(mut self, input: i64) -> Self {
        self.complete_window_minutes = ::std::option::Option::Some(input);
        self
    }
    /// <p>A value in minutes during which a successfully started backup must complete, or else Backup will cancel the job. This value is optional. This value begins counting down from when the backup was scheduled. It does not add additional time for <code>StartWindowMinutes</code>, or if the backup started later than scheduled.</p>
    /// <p>Like <code>StartWindowMinutes</code>, this parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    pub fn set_complete_window_minutes(mut self, input: ::std::option::Option<i64>) -> Self {
        self.complete_window_minutes = input;
        self
    }
    /// <p>A value in minutes during which a successfully started backup must complete, or else Backup will cancel the job. This value is optional. This value begins counting down from when the backup was scheduled. It does not add additional time for <code>StartWindowMinutes</code>, or if the backup started later than scheduled.</p>
    /// <p>Like <code>StartWindowMinutes</code>, this parameter has a maximum value of 100 years (52,560,000 minutes).</p>
    pub fn get_complete_window_minutes(&self) -> &::std::option::Option<i64> {
        &self.complete_window_minutes
    }
    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup will transition and expire backups automatically according to the lifecycle that you define.</p>
    /// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.</p>
    /// <p>Resource types that can transition to cold storage are listed in the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource">Feature availability by resource</a> table. Backup ignores this expression for other resource types.</p>
    /// <p>This parameter has a maximum value of 100 years (36,500 days).</p>
    pub fn lifecycle(mut self, input: crate::types::Lifecycle) -> Self {
        self.lifecycle = ::std::option::Option::Some(input);
        self
    }
    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup will transition and expire backups automatically according to the lifecycle that you define.</p>
    /// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.</p>
    /// <p>Resource types that can transition to cold storage are listed in the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource">Feature availability by resource</a> table. Backup ignores this expression for other resource types.</p>
    /// <p>This parameter has a maximum value of 100 years (36,500 days).</p>
    pub fn set_lifecycle(mut self, input: ::std::option::Option<crate::types::Lifecycle>) -> Self {
        self.lifecycle = input;
        self
    }
    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup will transition and expire backups automatically according to the lifecycle that you define.</p>
    /// <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.</p>
    /// <p>Resource types that can transition to cold storage are listed in the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/backup-feature-availability.html#features-by-resource">Feature availability by resource</a> table. Backup ignores this expression for other resource types.</p>
    /// <p>This parameter has a maximum value of 100 years (36,500 days).</p>
    pub fn get_lifecycle(&self) -> &::std::option::Option<crate::types::Lifecycle> {
        &self.lifecycle
    }
    /// Adds a key-value pair to `recovery_point_tags`.
    ///
    /// To override the contents of this collection use [`set_recovery_point_tags`](Self::set_recovery_point_tags).
    ///
    /// <p>The tags to assign to the resources.</p>
    pub fn recovery_point_tags(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.recovery_point_tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.recovery_point_tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags to assign to the resources.</p>
    pub fn set_recovery_point_tags(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.recovery_point_tags = input;
        self
    }
    /// <p>The tags to assign to the resources.</p>
    pub fn get_recovery_point_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.recovery_point_tags
    }
    /// Adds a key-value pair to `backup_options`.
    ///
    /// To override the contents of this collection use [`set_backup_options`](Self::set_backup_options).
    ///
    /// <p>The backup option for a selected resource. This option is only available for Windows Volume Shadow Copy Service (VSS) backup jobs.</p>
    /// <p>Valid values: Set to <code>"WindowsVSS":"enabled"</code> to enable the <code>WindowsVSS</code> backup option and create a Windows VSS backup. Set to <code>"WindowsVSS""disabled"</code> to create a regular backup. The <code>WindowsVSS</code> option is not enabled by default.</p>
    pub fn backup_options(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.backup_options.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.backup_options = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The backup option for a selected resource. This option is only available for Windows Volume Shadow Copy Service (VSS) backup jobs.</p>
    /// <p>Valid values: Set to <code>"WindowsVSS":"enabled"</code> to enable the <code>WindowsVSS</code> backup option and create a Windows VSS backup. Set to <code>"WindowsVSS""disabled"</code> to create a regular backup. The <code>WindowsVSS</code> option is not enabled by default.</p>
    pub fn set_backup_options(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.backup_options = input;
        self
    }
    /// <p>The backup option for a selected resource. This option is only available for Windows Volume Shadow Copy Service (VSS) backup jobs.</p>
    /// <p>Valid values: Set to <code>"WindowsVSS":"enabled"</code> to enable the <code>WindowsVSS</code> backup option and create a Windows VSS backup. Set to <code>"WindowsVSS""disabled"</code> to create a regular backup. The <code>WindowsVSS</code> option is not enabled by default.</p>
    pub fn get_backup_options(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.backup_options
    }
    /// <p>Include this parameter to enable index creation if your backup job has a resource type that supports backup indexes.</p>
    /// <p>Resource types that support backup indexes include:</p>
    /// <ul>
    /// <li>
    /// <p><code>EBS</code> for Amazon Elastic Block Store</p></li>
    /// <li>
    /// <p><code>S3</code> for Amazon Simple Storage Service (Amazon S3)</p></li>
    /// </ul>
    /// <p>Index can have 1 of 2 possible values, either <code>ENABLED</code> or <code>DISABLED</code>.</p>
    /// <p>To create a backup index for an eligible <code>ACTIVE</code> recovery point that does not yet have a backup index, set value to <code>ENABLED</code>.</p>
    /// <p>To delete a backup index, set value to <code>DISABLED</code>.</p>
    pub fn index(mut self, input: crate::types::Index) -> Self {
        self.index = ::std::option::Option::Some(input);
        self
    }
    /// <p>Include this parameter to enable index creation if your backup job has a resource type that supports backup indexes.</p>
    /// <p>Resource types that support backup indexes include:</p>
    /// <ul>
    /// <li>
    /// <p><code>EBS</code> for Amazon Elastic Block Store</p></li>
    /// <li>
    /// <p><code>S3</code> for Amazon Simple Storage Service (Amazon S3)</p></li>
    /// </ul>
    /// <p>Index can have 1 of 2 possible values, either <code>ENABLED</code> or <code>DISABLED</code>.</p>
    /// <p>To create a backup index for an eligible <code>ACTIVE</code> recovery point that does not yet have a backup index, set value to <code>ENABLED</code>.</p>
    /// <p>To delete a backup index, set value to <code>DISABLED</code>.</p>
    pub fn set_index(mut self, input: ::std::option::Option<crate::types::Index>) -> Self {
        self.index = input;
        self
    }
    /// <p>Include this parameter to enable index creation if your backup job has a resource type that supports backup indexes.</p>
    /// <p>Resource types that support backup indexes include:</p>
    /// <ul>
    /// <li>
    /// <p><code>EBS</code> for Amazon Elastic Block Store</p></li>
    /// <li>
    /// <p><code>S3</code> for Amazon Simple Storage Service (Amazon S3)</p></li>
    /// </ul>
    /// <p>Index can have 1 of 2 possible values, either <code>ENABLED</code> or <code>DISABLED</code>.</p>
    /// <p>To create a backup index for an eligible <code>ACTIVE</code> recovery point that does not yet have a backup index, set value to <code>ENABLED</code>.</p>
    /// <p>To delete a backup index, set value to <code>DISABLED</code>.</p>
    pub fn get_index(&self) -> &::std::option::Option<crate::types::Index> {
        &self.index
    }
    /// Consumes the builder and constructs a [`StartBackupJobInput`](crate::operation::start_backup_job::StartBackupJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_backup_job::StartBackupJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::start_backup_job::StartBackupJobInput {
            backup_vault_name: self.backup_vault_name,
            logically_air_gapped_backup_vault_arn: self.logically_air_gapped_backup_vault_arn,
            resource_arn: self.resource_arn,
            iam_role_arn: self.iam_role_arn,
            idempotency_token: self.idempotency_token,
            start_window_minutes: self.start_window_minutes,
            complete_window_minutes: self.complete_window_minutes,
            lifecycle: self.lifecycle,
            recovery_point_tags: self.recovery_point_tags,
            backup_options: self.backup_options,
            index: self.index,
        })
    }
}
impl ::std::fmt::Debug for StartBackupJobInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("StartBackupJobInputBuilder");
        formatter.field("backup_vault_name", &self.backup_vault_name);
        formatter.field("logically_air_gapped_backup_vault_arn", &self.logically_air_gapped_backup_vault_arn);
        formatter.field("resource_arn", &self.resource_arn);
        formatter.field("iam_role_arn", &self.iam_role_arn);
        formatter.field("idempotency_token", &self.idempotency_token);
        formatter.field("start_window_minutes", &self.start_window_minutes);
        formatter.field("complete_window_minutes", &self.complete_window_minutes);
        formatter.field("lifecycle", &self.lifecycle);
        formatter.field("recovery_point_tags", &"*** Sensitive Data Redacted ***");
        formatter.field("backup_options", &self.backup_options);
        formatter.field("index", &self.index);
        formatter.finish()
    }
}