Class LockConfiguration.Builder
java.lang.Object
software.amazon.awscdk.services.backup.LockConfiguration.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LockConfiguration>
- Enclosing interface:
LockConfiguration
@Stability(Stable)
public static final class LockConfiguration.Builder
extends Object
implements software.amazon.jsii.Builder<LockConfiguration>
A builder for
LockConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.changeableFor
(Duration changeableFor) Sets the value ofLockConfiguration.getChangeableFor()
maxRetention
(Duration maxRetention) Sets the value ofLockConfiguration.getMaxRetention()
minRetention
(Duration minRetention) Sets the value ofLockConfiguration.getMinRetention()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
minRetention
Sets the value ofLockConfiguration.getMinRetention()
- Parameters:
minRetention
- The minimum retention period that the vault retains its recovery points. This parameter is required. 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. Recovery points already saved in the vault prior to Vault Lock are not affected.- Returns:
this
-
changeableFor
Sets the value ofLockConfiguration.getChangeableFor()
- Parameters:
changeableFor
- The duration before the lock date. AWS Backup enforces a 72-hour cooling-off period before Vault Lock takes effect and becomes immutable.Before the lock date, you can delete Vault Lock from the vault or change the Vault Lock configuration. On and after the lock date, the Vault Lock becomes immutable and cannot be changed or deleted.
- Returns:
this
-
maxRetention
Sets the value ofLockConfiguration.getMaxRetention()
- Parameters:
maxRetention
- The maximum retention period that the vault retains its recovery points. 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. Recovery points already saved in the vault prior to Vault Lock are not affected.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LockConfiguration>
- Returns:
- a new instance of
LockConfiguration
- Throws:
NullPointerException
- if any required attribute was not provided
-