java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.rbin.CfnRulePropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:20:04.266Z") @Stability(Stable) public class CfnRulePropsMixin extends Mixin implements software.constructs.IMixin
Creates a Recycle Bin retention rule. You can create two types of retention rules:.

  • Tag-level retention rules - These retention rules use resource tags to identify the resources to protect. For each retention rule, you specify one or more tag key and value pairs. Resources (of the specified type) that have at least one of these tag key and value pairs are automatically retained in the Recycle Bin upon deletion. Use this type of retention rule to protect specific resources in your account based on their tags.
  • Region-level retention rules - These retention rules, by default, apply to all of the resources (of the specified type) in the Region, even if the resources are not tagged. However, you can specify exclusion tags to exclude resources that have specific tags. Use this type of retention rule to protect all resources of a specific type in a Region.

For more information, see Create Recycle Bin retention rules in the Amazon EBS User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.rbin.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnRulePropsMixin cfnRulePropsMixin = CfnRulePropsMixin.Builder.create(CfnRuleMixinProps.builder()
         .description("description")
         .excludeResourceTags(List.of(ResourceTagProperty.builder()
                 .resourceTagKey("resourceTagKey")
                 .resourceTagValue("resourceTagValue")
                 .build()))
         .lockConfiguration(UnlockDelayProperty.builder()
                 .unlockDelayUnit("unlockDelayUnit")
                 .unlockDelayValue(123)
                 .build())
         .resourceTags(List.of(ResourceTagProperty.builder()
                 .resourceTagKey("resourceTagKey")
                 .resourceTagValue("resourceTagValue")
                 .build()))
         .resourceType("resourceType")
         .retentionPeriod(RetentionPeriodProperty.builder()
                 .retentionPeriodUnit("retentionPeriodUnit")
                 .retentionPeriodValue(123)
                 .build())
         .status("status")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for CfnRulePropsMixin.
    static interface 
    [Tag-level retention rules only] Information about the resource tags used to identify resources that are retained by the retention rule.
    static interface 
    Information about the retention period for which the retention rule is to retain resources.
    static interface 
    Information about the retention rule unlock delay.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IMixin

    software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final List<String>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Create a mixin to apply properties to AWS::Rbin::Rule.
     
    Create a mixin to apply properties to AWS::Rbin::Rule.
    protected
    CfnRulePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    CfnRulePropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyTo(software.constructs.IConstruct construct)
    Apply the mixin properties to the construct.
     
    protected IMergeStrategy
     
    supports(software.constructs.IConstruct construct)
    Check if this mixin supports the given construct.

    Methods inherited from class software.amazon.awscdk.Mixin

    isMixin

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnRulePropsMixin

      protected CfnRulePropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnRulePropsMixin

      protected CfnRulePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnRulePropsMixin

      @Stability(Stable) public CfnRulePropsMixin(@NotNull CfnRuleMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::Rbin::Rule.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnRulePropsMixin

      @Stability(Stable) public CfnRulePropsMixin(@NotNull CfnRuleMixinProps props)
      Create a mixin to apply properties to AWS::Rbin::Rule.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnRuleMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()