class CfnRulePropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.Rbin.Mixins.CfnRulePropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsrbin/mixins#CfnRulePropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.rbin.mixins.CfnRulePropsMixin |
Python | aws_cdk.mixins_preview.aws_rbin.mixins.CfnRulePropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_rbin » mixins » CfnRulePropsMixin |
Implements
IMixin
Extends
Mixin
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 .
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as rbin_mixins } from '@aws-cdk/mixins-preview/aws-rbin';
const cfnRulePropsMixin = new rbin_mixins.CfnRulePropsMixin({
description: 'description',
excludeResourceTags: [{
resourceTagKey: 'resourceTagKey',
resourceTagValue: 'resourceTagValue',
}],
lockConfiguration: {
unlockDelayUnit: 'unlockDelayUnit',
unlockDelayValue: 123,
},
resourceTags: [{
resourceTagKey: 'resourceTagKey',
resourceTagValue: 'resourceTagValue',
}],
resourceType: 'resourceType',
retentionPeriod: {
retentionPeriodUnit: 'retentionPeriodUnit',
retentionPeriodValue: 123,
},
status: 'status',
tags: [{
key: 'key',
value: 'value',
}],
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnRulePropsMixin(props: CfnRuleMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Rule Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::Rbin::Rule.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript