Class CfnRuleMixinProps.Builder

java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.rbin.CfnRuleMixinProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleMixinProps>
Enclosing interface:
CfnRuleMixinProps

@Stability(Stable) public static final class CfnRuleMixinProps.Builder extends Object implements software.amazon.jsii.Builder<CfnRuleMixinProps>
A builder for CfnRuleMixinProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • description

      @Stability(Stable) public CfnRuleMixinProps.Builder description(String description)
      Parameters:
      description - The retention rule description.
      Returns:
      this
    • excludeResourceTags

      @Stability(Stable) public CfnRuleMixinProps.Builder excludeResourceTags(IResolvable excludeResourceTags)
      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)
      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)
      Parameters:
      lockConfiguration - Information about the retention rule lock configuration.
      Returns:
      this
    • lockConfiguration

      @Stability(Stable) public CfnRuleMixinProps.Builder lockConfiguration(CfnRulePropsMixin.UnlockDelayProperty lockConfiguration)
      Parameters:
      lockConfiguration - Information about the retention rule lock configuration.
      Returns:
      this
    • resourceTags

      @Stability(Stable) public CfnRuleMixinProps.Builder resourceTags(IResolvable resourceTags)
      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)
      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

      @Stability(Stable) public CfnRuleMixinProps.Builder resourceType(String resourceType)
      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 .
      Returns:
      this
    • retentionPeriod

      @Stability(Stable) public CfnRuleMixinProps.Builder retentionPeriod(IResolvable retentionPeriod)
      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)
      Parameters:
      retentionPeriod - Information about the retention period for which the retention rule is to retain resources.
      Returns:
      this
    • status

      @Stability(Stable) public CfnRuleMixinProps.Builder status(String status)
      Parameters:
      status - The state of the retention rule. Only retention rules that are in the available state retain resources.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnRuleMixinProps.Builder tags(List<? extends CfnTag> tags)
      Sets the value of CfnRuleMixinProps.getTags()
      Parameters:
      tags - Information about the tags to assign to the retention rule.
      Returns:
      this
    • build

      @Stability(Stable) public CfnRuleMixinProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnRuleMixinProps>
      Returns:
      a new instance of CfnRuleMixinProps
      Throws:
      NullPointerException - if any required attribute was not provided