Class CfnRulePropsMixin
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 ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnRulePropsMixin.static interface[Tag-level retention rules only] Information about the resource tags used to identify resources that are retained by the retention rule.static interfaceInformation about the retention period for which the retention rule is to retain resources.static interfaceInformation about the retention rule unlock delay.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::Rbin::Rule.CfnRulePropsMixin(CfnRuleMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::Rbin::Rule.protectedCfnRulePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnRulePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnRuleMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 toAWS::Rbin::Rule.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnRulePropsMixin
Create a mixin to apply properties toAWS::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. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-