interface CfnRuleProps
Language | Type name |
---|---|
![]() | Amazon.CDK.aws_rbin.CfnRuleProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsrbin#CfnRuleProps |
![]() | software.amazon.awscdk.services.rbin.CfnRuleProps |
![]() | aws_cdk.aws_rbin.CfnRuleProps |
![]() | aws-cdk-lib » aws_rbin » CfnRuleProps |
Properties for defining a CfnRule
.
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 { aws_rbin as rbin } from 'aws-cdk-lib';
const cfnRuleProps: rbin.CfnRuleProps = {
resourceType: 'resourceType',
retentionPeriod: {
retentionPeriodUnit: 'retentionPeriodUnit',
retentionPeriodValue: 123,
},
// the properties below are optional
description: 'description',
excludeResourceTags: [{
resourceTagKey: 'resourceTagKey',
resourceTagValue: 'resourceTagValue',
}],
lockConfiguration: {
unlockDelayUnit: 'unlockDelayUnit',
unlockDelayValue: 123,
},
resourceTags: [{
resourceTagKey: 'resourceTagKey',
resourceTagValue: 'resourceTagValue',
}],
status: 'status',
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
resource | string | The resource type to be retained by the retention rule. |
retention | IResolvable | Retention | Information about the retention period for which the retention rule is to retain resources. |
description? | string | The retention rule description. |
exclude | IResolvable | IResolvable | Resource [] | [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. |
lock | IResolvable | Unlock | Information about the retention rule lock configuration. |
resource | IResolvable | IResolvable | Resource [] | [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. |
status? | string | The state of the retention rule. |
tags? | Cfn [] | Information about the tags to assign to the retention rule. |
resourceType
Type:
string
The resource type to be retained by the retention rule.
Currently, only Amazon EBS snapshots and EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT
. To retain EBS-backed AMIs, specify EC2_IMAGE
.
retentionPeriod
Type:
IResolvable
|
Retention
Information about the retention period for which the retention rule is to retain resources.
description?
Type:
string
(optional)
The retention rule description.
excludeResourceTags?
Type:
IResolvable
|
IResolvable
|
Resource
[]
(optional)
[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.
lockConfiguration?
Type:
IResolvable
|
Unlock
(optional)
Information about the retention rule lock configuration.
resourceTags?
Type:
IResolvable
|
IResolvable
|
Resource
[]
(optional)
[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.
status?
Type:
string
(optional)
The state of the retention rule.
Only retention rules that are in the available
state retain resources.
tags?
Type:
Cfn
[]
(optional)
Information about the tags to assign to the retention rule.