Class: AWSCDK::SchedulerTargets::Tag
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SchedulerTargets::Tag
- Defined in:
- scheduler_targets/tag.rb
Overview
Metadata that you apply to a resource to help categorize and organize the resource.
Each tag consists of a key and an optional value, both of which you define.
Instance Attribute Summary collapse
-
#key ⇒ String
readonly
Key is the name of the tag.
-
#value ⇒ String
readonly
Value is the metadata contents of the tag.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key:, value:) ⇒ Tag
constructor
A new instance of Tag.
- #to_jsii ⇒ Object
Constructor Details
#initialize(key:, value:) ⇒ Tag
Returns a new instance of Tag.
11 12 13 14 15 16 |
# File 'scheduler_targets/tag.rb', line 11 def initialize(key:, value:) @key = key Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") end |
Instance Attribute Details
#key ⇒ String (readonly)
Key is the name of the tag.
21 22 23 |
# File 'scheduler_targets/tag.rb', line 21 def key @key end |
#value ⇒ String (readonly)
Value is the metadata contents of the tag.
25 26 27 |
# File 'scheduler_targets/tag.rb', line 25 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
27 28 29 30 31 32 |
# File 'scheduler_targets/tag.rb', line 27 def self.jsii_properties { :key => "key", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'scheduler_targets/tag.rb', line 34 def to_jsii result = {} result.merge!({ "key" => @key, "value" => @value, }) result.compact end |