Package software.amazon.awscdk
Class TagProps.Builder
java.lang.Object
software.amazon.awscdk.TagProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<TagProps>
- Enclosing interface:
TagProps
@Stability(Stable)
public static final class TagProps.Builder
extends Object
implements software.amazon.jsii.Builder<TagProps>
A builder for
TagProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyToLaunchedInstances
(Boolean applyToLaunchedInstances) Sets the value ofTagProps.getApplyToLaunchedInstances()
build()
Builds the configured instance.excludeResourceTypes
(List<String> excludeResourceTypes) Sets the value ofTagProps.getExcludeResourceTypes()
includeResourceTypes
(List<String> includeResourceTypes) Sets the value ofTagProps.getIncludeResourceTypes()
Sets the value ofTagProps.getPriority()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
applyToLaunchedInstances
@Stability(Stable) public TagProps.Builder applyToLaunchedInstances(Boolean applyToLaunchedInstances) Sets the value ofTagProps.getApplyToLaunchedInstances()
- Parameters:
applyToLaunchedInstances
- Whether the tag should be applied to instances in an AutoScalingGroup.- Returns:
this
-
excludeResourceTypes
Sets the value ofTagProps.getExcludeResourceTypes()
- Parameters:
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.- Returns:
this
-
includeResourceTypes
Sets the value ofTagProps.getIncludeResourceTypes()
- Parameters:
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.- Returns:
this
-
priority
Sets the value ofTagProps.getPriority()
- Parameters:
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.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<TagProps>
- Returns:
- a new instance of
TagProps
- Throws:
NullPointerException
- if any required attribute was not provided
-