Skip to content

CreateRuleRequest

Source code in docs_src/capo_rbin/types/create_rule_request.py
class CreateRuleRequest(TypedDict, closed=True):
    retention_period: "capo_rbin.types.retention_period.RetentionPeriod"
    """<p>Information about the retention period for which the retention rule is to retain resources.</p>"""
    description: NotRequired["capo_rbin.types.description.Description"]
    """<p>The retention rule description.</p>"""
    tags: NotRequired["capo_rbin.types.tag_list.TagList"]
    """<p>Information about the tags to assign to the retention rule.</p>"""
    resource_type: "capo_rbin.types.resource_type.ResourceType"
    """<p>The resource type to be retained by the retention rule. Currently, only EBS volumes, EBS snapshots, and EBS-backed AMIs are supported.</p> <ul> <li> <p>To retain EBS volumes, specify <code>EBS_VOLUME</code>.</p> </li> <li> <p>To retain EBS snapshots, specify <code>EBS_SNAPSHOT</code> </p> </li> <li> <p>To retain EBS-backed AMIs, specify <code>EC2_IMAGE</code>.</p> </li> </ul>"""
    resource_tags: NotRequired["capo_rbin.types.resource_tags.ResourceTags"]
    """<p>[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.</p> <p>You can add the same tag key and value pair to a maximum or five retention rules.</p> <p>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.</p>"""
    lock_configuration: NotRequired[
        "capo_rbin.types.lock_configuration.LockConfiguration"
    ]
    """<p>Information about the retention rule lock configuration.</p>"""
    exclude_resource_tags: NotRequired[
        "capo_rbin.types.exclude_resource_tags.ExcludeResourceTags"
    ]
    """<p>[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.</p> <p>You can't specify exclusion tags for tag-level retention rules.</p>"""

description instance-attribute

description: NotRequired[Description]

The retention rule description.

exclude_resource_tags instance-attribute

exclude_resource_tags: NotRequired[ExcludeResourceTags]

[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 instance-attribute

lock_configuration: NotRequired[LockConfiguration]

Information about the retention rule lock configuration.

resource_tags instance-attribute

resource_tags: NotRequired[ResourceTags]

[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 instance-attribute

resource_type: ResourceType

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 instance-attribute

retention_period: RetentionPeriod

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

tags instance-attribute

tags: NotRequired[TagList]

Information about the tags to assign to the retention rule.