TagProps
- class aws_cdk.TagProps(*, apply_to_launched_instances=None, exclude_resource_types=None, include_resource_types=None, priority=None)
Bases:
object
Properties for a tag.
- Parameters:
apply_to_launched_instances (
Optional
[bool
]) – Whether the tag should be applied to instances in an AutoScalingGroup. Default: trueexclude_resource_types (
Optional
[Sequence
[str
]]) – An array of Resource Types that will not receive this tag. An empty array will allow this tag to be applied to all resources. A non-empty array will apply this tag only if the Resource type is not in this array. Default: []include_resource_types (
Optional
[Sequence
[str
]]) – An array of Resource Types that will receive this tag. An empty array will match any Resource. A non-empty array will apply this tag only to Resource types that are included in this array. Default: []priority (
Union
[int
,float
,None
]) – Priority of the tag operation. Higher or equal priority tags will take precedence. Setting priority will enable the user to control tags when they need to not follow the default precedence pattern of last applied and closest to the construct in the tree. Default: Default priorities: - 100 forSetTag
- 200 forRemoveTag
- 50 for tags added directly to CloudFormation resources
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk tag_props = cdk.TagProps( apply_to_launched_instances=False, exclude_resource_types=["excludeResourceTypes"], include_resource_types=["includeResourceTypes"], priority=123 )
Attributes
- apply_to_launched_instances
Whether the tag should be applied to instances in an AutoScalingGroup.
- Default:
true
- exclude_resource_types
An array of Resource Types that will not receive this tag.
An empty array will allow this tag to be applied to all resources. A non-empty array will apply this tag only if the Resource type is not in this array.
- Default:
[]
- include_resource_types
An array of Resource Types that will receive this tag.
An empty array will match any Resource. A non-empty array will apply this tag only to Resource types that are included in this array.
- Default:
[]
- priority
Priority of the tag operation.
Higher or equal priority tags will take precedence.
Setting priority will enable the user to control tags when they need to not follow the default precedence pattern of last applied and closest to the construct in the tree.
- Default:
Default priorities:
100 for
SetTag
200 for
RemoveTag
50 for tags added directly to CloudFormation resources