Class TagProps.Builder

java.lang.Object
software.amazon.awscdk.core.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 Details

    • Builder

      public Builder()
  • Method Details

    • applyToLaunchedInstances

      @Stability(Stable) public TagProps.Builder applyToLaunchedInstances(Boolean applyToLaunchedInstances)
      Parameters:
      applyToLaunchedInstances - Whether the tag should be applied to instances in an AutoScalingGroup.
      Returns:
      this
    • excludeResourceTypes

      @Stability(Stable) public TagProps.Builder excludeResourceTypes(List<String> excludeResourceTypes)
      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

      @Stability(Stable) public TagProps.Builder includeResourceTypes(List<String> includeResourceTypes)
      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

      @Stability(Stable) public TagProps.Builder priority(Number priority)
      Sets the value of TagProps.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

      @Stability(Stable) public TagProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<TagProps>
      Returns:
      a new instance of TagProps
      Throws:
      NullPointerException - if any required attribute was not provided