Package software.amazon.awscdk.core
Class Tag.Builder
java.lang.Object
software.amazon.awscdk.core.Tag.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Tag>
- Enclosing class:
Tag
@Stability(Stable)
public static final class Tag.Builder
extends Object
implements software.amazon.jsii.Builder<Tag>
A fluent builder for
Tag
.-
Method Summary
Modifier and TypeMethodDescriptionapplyToLaunchedInstances
(Boolean applyToLaunchedInstances) Whether the tag should be applied to instances in an AutoScalingGroup.build()
static Tag.Builder
excludeResourceTypes
(List<String> excludeResourceTypes) An array of Resource Types that will not receive this tag.includeResourceTypes
(List<String> includeResourceTypes) An array of Resource Types that will receive this tag.Priority of the tag operation.
-
Method Details
-
create
- Parameters:
key
- This parameter is required.value
- This parameter is required.- Returns:
- a new instance of
Tag.Builder
.
-
applyToLaunchedInstances
Whether the tag should be applied to instances in an AutoScalingGroup.Default: true
- Parameters:
applyToLaunchedInstances
- Whether the tag should be applied to instances in an AutoScalingGroup. This parameter is required.- Returns:
this
-
excludeResourceTypes
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: []
- Parameters:
excludeResourceTypes
- An array of Resource Types that will not receive this tag. This parameter is required.- Returns:
this
-
includeResourceTypes
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: []
- Parameters:
includeResourceTypes
- An array of Resource Types that will receive this tag. This parameter is required.- Returns:
this
-
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
invalid @link
SetTag
RemoveTag
- 50 for tags added directly to CloudFormation resources- Parameters:
priority
- Priority of the tag operation. This parameter is required.- Returns:
this
-
build
-