Class: AWSCDK::Tag
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Tag
- Includes:
- IAspect
- Defined in:
- tag.rb
Overview
The Tag Aspect will handle adding a tag to this node and cascading tags to children.
Class Method Summary collapse
Instance Method Summary collapse
- #apply_tag(resource) ⇒ void
- #apply_tag_v2(resource) ⇒ void
-
#initialize(key, value, props = nil) ⇒ Tag
constructor
A new instance of Tag.
-
#key ⇒ String
The string key for the tag.
- #props ⇒ AWSCDK::TagProps
-
#value ⇒ String
The string value of the tag.
-
#visit(construct) ⇒ void
All aspects can visit an IConstruct.
Constructor Details
#initialize(key, value, props = nil) ⇒ Tag
Returns a new instance of Tag.
12 13 14 15 16 17 18 |
# File 'tag.rb', line 12 def initialize(key, value, props = nil) props = props.is_a?(Hash) ? ::AWSCDK::TagProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5UYWdQcm9wcyJ9")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(key, value, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'tag.rb', line 20 def self.jsii_overridable_methods { :key => { kind: :property, name: "key", is_optional: false }, :props => { kind: :property, name: "props", is_optional: false }, :value => { kind: :property, name: "value", is_optional: false }, :apply_tag => { kind: :method, name: "applyTag", is_optional: false }, :apply_tag_v2 => { kind: :method, name: "applyTagV2", is_optional: false }, :visit => { kind: :method, name: "visit", is_optional: false }, } end |
Instance Method Details
#apply_tag(resource) ⇒ void
This method returns an undefined value.
52 53 54 55 |
# File 'tag.rb', line 52 def apply_tag(resource) Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JVGFnZ2FibGUifQ==")), "resource") jsii_call_method("applyTag", [resource]) end |
#apply_tag_v2(resource) ⇒ void
This method returns an undefined value.
59 60 61 62 |
# File 'tag.rb', line 59 def apply_tag_v2(resource) Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JVGFnZ2FibGVWMiJ9")), "resource") jsii_call_method("applyTagV2", [resource]) end |
#key ⇒ String
The string key for the tag.
34 35 36 |
# File 'tag.rb', line 34 def key() jsii_get_property("key") end |
#props ⇒ AWSCDK::TagProps
39 40 41 |
# File 'tag.rb', line 39 def props() jsii_get_property("props") end |
#value ⇒ String
The string value of the tag.
46 47 48 |
# File 'tag.rb', line 46 def value() jsii_get_property("value") end |
#visit(construct) ⇒ void
This method returns an undefined value.
All aspects can visit an IConstruct.
68 69 70 71 |
# File 'tag.rb', line 68 def visit(construct) Jsii::Type.check_type(construct, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "construct") jsii_call_method("visit", [construct]) end |