Class CfnRuleMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleMixinProps>
- Enclosing interface:
CfnRuleMixinProps
CfnRuleMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.description(String description) Sets the value ofCfnRuleMixinProps.getDescription()excludeResourceTags(List<? extends Object> excludeResourceTags) Sets the value ofCfnRuleMixinProps.getExcludeResourceTags()excludeResourceTags(IResolvable excludeResourceTags) Sets the value ofCfnRuleMixinProps.getExcludeResourceTags()lockConfiguration(CfnRulePropsMixin.UnlockDelayProperty lockConfiguration) Sets the value ofCfnRuleMixinProps.getLockConfiguration()lockConfiguration(IResolvable lockConfiguration) Sets the value ofCfnRuleMixinProps.getLockConfiguration()resourceTags(List<? extends Object> resourceTags) Sets the value ofCfnRuleMixinProps.getResourceTags()resourceTags(IResolvable resourceTags) Sets the value ofCfnRuleMixinProps.getResourceTags()resourceType(String resourceType) Sets the value ofCfnRuleMixinProps.getResourceType()retentionPeriod(CfnRulePropsMixin.RetentionPeriodProperty retentionPeriod) Sets the value ofCfnRuleMixinProps.getRetentionPeriod()retentionPeriod(IResolvable retentionPeriod) Sets the value ofCfnRuleMixinProps.getRetentionPeriod()Sets the value ofCfnRuleMixinProps.getStatus()Sets the value ofCfnRuleMixinProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
description
Sets the value ofCfnRuleMixinProps.getDescription()- Parameters:
description- The retention rule description.- Returns:
this
-
excludeResourceTags
@Stability(Stable) public CfnRuleMixinProps.Builder excludeResourceTags(IResolvable excludeResourceTags) Sets the value ofCfnRuleMixinProps.getExcludeResourceTags()- Parameters:
excludeResourceTags- [Region-level retention rules only] Specifies the exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. Resources that have any of these tags are not retained by the retention rule upon deletion.You can't specify exclusion tags for tag-level retention rules.
- Returns:
this
-
excludeResourceTags
@Stability(Stable) public CfnRuleMixinProps.Builder excludeResourceTags(List<? extends Object> excludeResourceTags) Sets the value ofCfnRuleMixinProps.getExcludeResourceTags()- Parameters:
excludeResourceTags- [Region-level retention rules only] Specifies the exclusion tags to use to identify resources that are to be excluded, or ignored, by a Region-level retention rule. Resources that have any of these tags are not retained by the retention rule upon deletion.You can't specify exclusion tags for tag-level retention rules.
- Returns:
this
-
lockConfiguration
@Stability(Stable) public CfnRuleMixinProps.Builder lockConfiguration(IResolvable lockConfiguration) Sets the value ofCfnRuleMixinProps.getLockConfiguration()- Parameters:
lockConfiguration- Information about the retention rule lock configuration.- Returns:
this
-
lockConfiguration
@Stability(Stable) public CfnRuleMixinProps.Builder lockConfiguration(CfnRulePropsMixin.UnlockDelayProperty lockConfiguration) Sets the value ofCfnRuleMixinProps.getLockConfiguration()- Parameters:
lockConfiguration- Information about the retention rule lock configuration.- Returns:
this
-
resourceTags
Sets the value ofCfnRuleMixinProps.getResourceTags()- Parameters:
resourceTags- [Tag-level retention rules only] Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
- Returns:
this
-
resourceTags
@Stability(Stable) public CfnRuleMixinProps.Builder resourceTags(List<? extends Object> resourceTags) Sets the value ofCfnRuleMixinProps.getResourceTags()- Parameters:
resourceTags- [Tag-level retention rules only] Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
- Returns:
this
-
resourceType
Sets the value ofCfnRuleMixinProps.getResourceType()- Parameters:
resourceType- The resource type to be retained by the retention rule. Currently, only EBS volumes, EBS snapshots, and EBS-backed AMIs are supported.- To retain EBS volumes, specify
EBS_VOLUME. - To retain EBS snapshots, specify
EBS_SNAPSHOT - To retain EBS-backed AMIs, specify
EC2_IMAGE.
- To retain EBS volumes, specify
- Returns:
this
-
retentionPeriod
Sets the value ofCfnRuleMixinProps.getRetentionPeriod()- Parameters:
retentionPeriod- Information about the retention period for which the retention rule is to retain resources.- Returns:
this
-
retentionPeriod
@Stability(Stable) public CfnRuleMixinProps.Builder retentionPeriod(CfnRulePropsMixin.RetentionPeriodProperty retentionPeriod) Sets the value ofCfnRuleMixinProps.getRetentionPeriod()- Parameters:
retentionPeriod- Information about the retention period for which the retention rule is to retain resources.- Returns:
this
-
status
Sets the value ofCfnRuleMixinProps.getStatus()- Parameters:
status- The state of the retention rule. Only retention rules that are in theavailablestate retain resources.- Returns:
this
-
tags
Sets the value ofCfnRuleMixinProps.getTags()- Parameters:
tags- Information about the tags to assign to the retention rule.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnRuleMixinProps>- Returns:
- a new instance of
CfnRuleMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-