Class: AWSCDK::TagProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::TagProps
- Defined in:
- tag_props.rb
Overview
Properties for a tag.
Instance Attribute Summary collapse
-
#apply_to_launched_instances ⇒ Boolean?
readonly
Whether the tag should be applied to instances in an AutoScalingGroup.
-
#exclude_resource_types ⇒ Array<String>?
readonly
An array of Resource Types that will not receive this tag.
-
#include_resource_types ⇒ Array<String>?
readonly
An array of Resource Types that will receive this tag.
-
#priority ⇒ Numeric?
readonly
Priority of the tag operation.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(apply_to_launched_instances: nil, exclude_resource_types: nil, include_resource_types: nil, priority: nil) ⇒ TagProps
constructor
A new instance of TagProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(apply_to_launched_instances: nil, exclude_resource_types: nil, include_resource_types: nil, priority: nil) ⇒ TagProps
Returns a new instance of TagProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'tag_props.rb', line 11 def initialize(apply_to_launched_instances: nil, exclude_resource_types: nil, include_resource_types: nil, priority: nil) @apply_to_launched_instances = apply_to_launched_instances Jsii::Type.check_type(@apply_to_launched_instances, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "applyToLaunchedInstances") unless @apply_to_launched_instances.nil? @exclude_resource_types = exclude_resource_types Jsii::Type.check_type(@exclude_resource_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludeResourceTypes") unless @exclude_resource_types.nil? @include_resource_types = include_resource_types Jsii::Type.check_type(@include_resource_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "includeResourceTypes") unless @include_resource_types.nil? @priority = priority Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil? end |
Instance Attribute Details
#apply_to_launched_instances ⇒ Boolean? (readonly)
Default: true
Whether the tag should be applied to instances in an AutoScalingGroup.
26 27 28 |
# File 'tag_props.rb', line 26 def apply_to_launched_instances @apply_to_launched_instances end |
#exclude_resource_types ⇒ Array<String>? (readonly)
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.
35 36 37 |
# File 'tag_props.rb', line 35 def exclude_resource_types @exclude_resource_types end |
#include_resource_types ⇒ Array<String>? (readonly)
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.
43 44 45 |
# File 'tag_props.rb', line 43 def include_resource_types @include_resource_types end |
#priority ⇒ Numeric? (readonly)
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.
54 55 56 |
# File 'tag_props.rb', line 54 def priority @priority end |
Class Method Details
.jsii_properties ⇒ Object
56 57 58 59 60 61 62 63 |
# File 'tag_props.rb', line 56 def self.jsii_properties { :apply_to_launched_instances => "applyToLaunchedInstances", :exclude_resource_types => "excludeResourceTypes", :include_resource_types => "includeResourceTypes", :priority => "priority", } end |
Instance Method Details
#to_jsii ⇒ Object
65 66 67 68 69 70 71 72 73 74 |
# File 'tag_props.rb', line 65 def to_jsii result = {} result.merge!({ "applyToLaunchedInstances" => @apply_to_launched_instances, "excludeResourceTypes" => @exclude_resource_types, "includeResourceTypes" => @include_resource_types, "priority" => @priority, }) result.compact end |