aws_sdk_backup/client/put_backup_vault_lock_configuration.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`PutBackupVaultLockConfiguration`](crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`backup_vault_name(impl Into<String>)`](crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder::backup_vault_name) / [`set_backup_vault_name(Option<String>)`](crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder::set_backup_vault_name):<br>required: **true**<br><p>The Backup Vault Lock configuration that specifies the name of the backup vault it protects.</p><br>
7 /// - [`min_retention_days(i64)`](crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder::min_retention_days) / [`set_min_retention_days(Option<i64>)`](crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder::set_min_retention_days):<br>required: **false**<br><p>The Backup Vault Lock configuration that specifies the minimum retention period that the vault retains its recovery points. This setting can be useful if, for example, your organization's policies require you to retain certain data for at least seven years (2555 days).</p> <p>This parameter is required when a vault lock is created through CloudFormation; otherwise, this parameter is optional. If this parameter is not specified, Vault Lock will not enforce a minimum retention period.</p> <p>If this parameter is specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or longer than the minimum retention period. If the job's retention period is shorter than that minimum retention period, then the vault fails that backup or copy job, and you should either modify your lifecycle settings or use a different vault. The shortest minimum retention period you can specify is 1 day. Recovery points already saved in the vault prior to Vault Lock are not affected.</p><br>
8 /// - [`max_retention_days(i64)`](crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder::max_retention_days) / [`set_max_retention_days(Option<i64>)`](crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder::set_max_retention_days):<br>required: **false**<br><p>The Backup Vault Lock configuration that specifies the maximum retention period that the vault retains its recovery points. This setting can be useful if, for example, your organization's policies require you to destroy certain data after retaining it for four years (1460 days).</p> <p>If this parameter is not included, Vault Lock does not enforce a maximum retention period on the recovery points in the vault. If this parameter is included without a value, Vault Lock will not enforce a maximum retention period.</p> <p>If this parameter is specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or shorter than the maximum retention period. If the job's retention period is longer than that maximum retention period, then the vault fails the backup or copy job, and you should either modify your lifecycle settings or use a different vault. The longest maximum retention period you can specify is 36500 days (approximately 100 years). Recovery points already saved in the vault prior to Vault Lock are not affected.</p><br>
9 /// - [`changeable_for_days(i64)`](crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder::changeable_for_days) / [`set_changeable_for_days(Option<i64>)`](crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder::set_changeable_for_days):<br>required: **false**<br><p>The Backup Vault Lock configuration that specifies the number of days before the lock date. For example, setting <code>ChangeableForDays</code> to 30 on Jan. 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm UTC.</p> <p>Backup enforces a 72-hour cooling-off period before Vault Lock takes effect and becomes immutable. Therefore, you must set <code>ChangeableForDays</code> to 3 or greater.</p> <p>Before the lock date, you can delete Vault Lock from the vault using <code>DeleteBackupVaultLockConfiguration</code> or change the Vault Lock configuration using <code>PutBackupVaultLockConfiguration</code>. On and after the lock date, the Vault Lock becomes immutable and cannot be changed or deleted.</p> <p>If this parameter is not specified, you can delete Vault Lock from the vault using <code>DeleteBackupVaultLockConfiguration</code> or change the Vault Lock configuration using <code>PutBackupVaultLockConfiguration</code> at any time.</p><br>
10 /// - On success, responds with [`PutBackupVaultLockConfigurationOutput`](crate::operation::put_backup_vault_lock_configuration::PutBackupVaultLockConfigurationOutput)
11 /// - On failure, responds with [`SdkError<PutBackupVaultLockConfigurationError>`](crate::operation::put_backup_vault_lock_configuration::PutBackupVaultLockConfigurationError)
12 pub fn put_backup_vault_lock_configuration(
13 &self,
14 ) -> crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder {
15 crate::operation::put_backup_vault_lock_configuration::builders::PutBackupVaultLockConfigurationFluentBuilder::new(self.handle.clone())
16 }
17}