Class CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.services.dlm.CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLifecyclePolicy.CrossRegionCopyRuleProperty>
- Enclosing interface:
CfnLifecyclePolicy.CrossRegionCopyRuleProperty
@Stability(Stable)
public static final class CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLifecyclePolicy.CrossRegionCopyRuleProperty>
A builder for
CfnLifecyclePolicy.CrossRegionCopyRuleProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getCmkArn()
Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getCopyTags()
copyTags
(IResolvable copyTags) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getCopyTags()
deprecateRule
(IResolvable deprecateRule) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getDeprecateRule()
Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getDeprecateRule()
Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getEncrypted()
encrypted
(IResolvable encrypted) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getEncrypted()
retainRule
(IResolvable retainRule) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getRetainRule()
Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getRetainRule()
Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getTarget()
targetRegion
(String targetRegion) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getTargetRegion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
encrypted
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder encrypted(Boolean encrypted) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getEncrypted()
- Parameters:
encrypted
- To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. This parameter is required. Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.- Returns:
this
-
encrypted
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder encrypted(IResolvable encrypted) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getEncrypted()
- Parameters:
encrypted
- To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. This parameter is required. Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.- Returns:
this
-
cmkArn
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder cmkArn(String cmkArn) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getCmkArn()
- Parameters:
cmkArn
- The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption. If this parameter is not specified, the default KMS key for the account is used.- Returns:
this
-
copyTags
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder copyTags(Boolean copyTags) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getCopyTags()
- Parameters:
copyTags
- Indicates whether to copy all user-defined tags from the source snapshot or AMI to the cross-Region copy.- Returns:
this
-
copyTags
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder copyTags(IResolvable copyTags) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getCopyTags()
- Parameters:
copyTags
- Indicates whether to copy all user-defined tags from the source snapshot or AMI to the cross-Region copy.- Returns:
this
-
deprecateRule
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder deprecateRule(IResolvable deprecateRule) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getDeprecateRule()
- Parameters:
deprecateRule
- [Custom AMI policies only] The AMI deprecation rule for cross-Region AMI copies created by the rule.- Returns:
this
-
deprecateRule
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder deprecateRule(CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty deprecateRule) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getDeprecateRule()
- Parameters:
deprecateRule
- [Custom AMI policies only] The AMI deprecation rule for cross-Region AMI copies created by the rule.- Returns:
this
-
retainRule
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder retainRule(IResolvable retainRule) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getRetainRule()
- Parameters:
retainRule
- The retention rule that indicates how long the cross-Region snapshot or AMI copies are to be retained in the destination Region.- Returns:
this
-
retainRule
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder retainRule(CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty retainRule) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getRetainRule()
- Parameters:
retainRule
- The retention rule that indicates how long the cross-Region snapshot or AMI copies are to be retained in the destination Region.- Returns:
this
-
target
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder target(String target) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getTarget()
- Parameters:
target
-
[Custom snapshot policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.Use this parameter for snapshot policies only. For AMI policies, use TargetRegion instead.
- Returns:
this
-
targetRegion
@Stability(Stable) public CfnLifecyclePolicy.CrossRegionCopyRuleProperty.Builder targetRegion(String targetRegion) Sets the value ofCfnLifecyclePolicy.CrossRegionCopyRuleProperty.getTargetRegion()
- Parameters:
targetRegion
-
For snapshot policies, use Target instead. For snapshot policies created before the Target parameter was introduced, this parameter indicates the target Region for snapshot copies.Use this parameter for AMI policies only.
[Custom AMI policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLifecyclePolicy.CrossRegionCopyRuleProperty>
- Returns:
- a new instance of
CfnLifecyclePolicy.CrossRegionCopyRuleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-