interface TagProps
Language | Type name |
---|---|
.NET | Amazon.CDK.TagProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2#TagProps |
Java | software.amazon.awscdk.TagProps |
Python | aws_cdk.TagProps |
TypeScript (source) | aws-cdk-lib » TagProps |
Properties for a tag.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const tagProps: cdk.TagProps = {
applyToLaunchedInstances: false,
excludeResourceTypes: ['excludeResourceTypes'],
includeResourceTypes: ['includeResourceTypes'],
priority: 123,
};
Properties
Name | Type | Description |
---|---|---|
apply | boolean | Whether the tag should be applied to instances in an AutoScalingGroup. |
exclude | string[] | An array of Resource Types that will not receive this tag. |
include | string[] | An array of Resource Types that will receive this tag. |
priority? | number | Priority of the tag operation. |
applyToLaunchedInstances?
Type:
boolean
(optional, default: true)
Whether the tag should be applied to instances in an AutoScalingGroup.
excludeResourceTypes?
Type:
string[]
(optional, default: [])
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.
includeResourceTypes?
Type:
string[]
(optional, default: [])
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.
priority?
Type:
number
*(optional, default: Default priorities:
- 100 for
SetTag
- 200 for
RemoveTag
- 50 for tags added directly to CloudFormation resources)*
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.