Class: AWSCDK::Backup::TagCondition
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Backup::TagCondition
- Defined in:
- backup/tag_condition.rb
Overview
A tag condition.
Instance Attribute Summary collapse
-
#key ⇒ String
readonly
The key in a key-value pair.
-
#operation ⇒ AWSCDK::Backup::TagOperation?
readonly
An operation that is applied to a key-value pair used to filter resources in a selection.
-
#value ⇒ String
readonly
The value in a key-value pair.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key:, value:, operation: nil) ⇒ TagCondition
constructor
A new instance of TagCondition.
- #to_jsii ⇒ Object
Constructor Details
#initialize(key:, value:, operation: nil) ⇒ TagCondition
Returns a new instance of TagCondition.
10 11 12 13 14 15 16 17 |
# File 'backup/tag_condition.rb', line 10 def initialize(key:, value:, operation: nil) @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") @operation = operation Jsii::Type.check_type(@operation, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmFja3VwLlRhZ09wZXJhdGlvbiJ9")), "operation") unless @operation.nil? end |
Instance Attribute Details
#key ⇒ String (readonly)
The key in a key-value pair.
For example, in "ec2:ResourceTag/Department": "accounting",
ec2:ResourceTag/Department is the key.
25 26 27 |
# File 'backup/tag_condition.rb', line 25 def key @key end |
#operation ⇒ AWSCDK::Backup::TagOperation? (readonly)
Note:
Default: STRING_EQUALS
An operation that is applied to a key-value pair used to filter resources in a selection.
37 38 39 |
# File 'backup/tag_condition.rb', line 37 def operation @operation end |
#value ⇒ String (readonly)
The value in a key-value pair.
For example, in "ec2:ResourceTag/Department": "accounting",
accounting is the value.
32 33 34 |
# File 'backup/tag_condition.rb', line 32 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
39 40 41 42 43 44 45 |
# File 'backup/tag_condition.rb', line 39 def self.jsii_properties { :key => "key", :value => "value", :operation => "operation", } end |
Instance Method Details
#to_jsii ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'backup/tag_condition.rb', line 47 def to_jsii result = {} result.merge!({ "key" => @key, "value" => @value, "operation" => @operation, }) result.compact end |