CfnRuleMixinProps

class aws_cdk.mixins_preview.aws_rbin.mixins.CfnRuleMixinProps(*, description=None, exclude_resource_tags=None, lock_configuration=None, resource_tags=None, resource_type=None, retention_period=None, status=None, tags=None)

Bases: object

Properties for CfnRulePropsMixin.

Parameters:
  • description (Optional[str]) – The retention rule description.

  • exclude_resource_tags (Union[IResolvable, Sequence[Union[IResolvable, ResourceTagProperty, Dict[str, Any]]], None]) – [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.

  • lock_configuration (Union[IResolvable, UnlockDelayProperty, Dict[str, Any], None]) – Information about the retention rule lock configuration.

  • resource_tags (Union[IResolvable, Sequence[Union[IResolvable, ResourceTagProperty, Dict[str, Any]]], None]) – [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.

  • resource_type (Optional[str]) – 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 .

  • retention_period (Union[IResolvable, RetentionPeriodProperty, Dict[str, Any], None]) – Information about the retention period for which the retention rule is to retain resources.

  • status (Optional[str]) – The state of the retention rule. Only retention rules that are in the available state retain resources.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – Information about the tags to assign to the retention rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_rbin import mixins as rbin_mixins

cfn_rule_mixin_props = rbin_mixins.CfnRuleMixinProps(
    description="description",
    exclude_resource_tags=[rbin_mixins.CfnRulePropsMixin.ResourceTagProperty(
        resource_tag_key="resourceTagKey",
        resource_tag_value="resourceTagValue"
    )],
    lock_configuration=rbin_mixins.CfnRulePropsMixin.UnlockDelayProperty(
        unlock_delay_unit="unlockDelayUnit",
        unlock_delay_value=123
    ),
    resource_tags=[rbin_mixins.CfnRulePropsMixin.ResourceTagProperty(
        resource_tag_key="resourceTagKey",
        resource_tag_value="resourceTagValue"
    )],
    resource_type="resourceType",
    retention_period=rbin_mixins.CfnRulePropsMixin.RetentionPeriodProperty(
        retention_period_unit="retentionPeriodUnit",
        retention_period_value=123
    ),
    status="status",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

description

The retention rule description.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html#cfn-rbin-rule-description

exclude_resource_tags

[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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html#cfn-rbin-rule-excluderesourcetags

lock_configuration

Information about the retention rule lock configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html#cfn-rbin-rule-lockconfiguration

resource_tags

[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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html#cfn-rbin-rule-resourcetags

resource_type

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html#cfn-rbin-rule-resourcetype

retention_period

Information about the retention period for which the retention rule is to retain resources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html#cfn-rbin-rule-retentionperiod

status

The state of the retention rule.

Only retention rules that are in the available state retain resources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html#cfn-rbin-rule-status

tags

Information about the tags to assign to the retention rule.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rbin-rule.html#cfn-rbin-rule-tags