Class: AWSCDK::Backup::TagCondition

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
backup/tag_condition.rb

Overview

A tag condition.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:, operation: nil) ⇒ TagCondition

Returns a new instance of TagCondition.

Parameters:

  • key (String)

    The key in a key-value pair.

  • value (String)

    The value in a key-value pair.

  • operation (AWSCDK::Backup::TagOperation, nil) (defaults to: nil)

    An operation that is applied to a key-value pair used to filter resources in a selection.



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

#keyString (readonly)

The key in a key-value pair.

For example, in "ec2:ResourceTag/Department": "accounting", ec2:ResourceTag/Department is the key.

Returns:

  • (String)


25
26
27
# File 'backup/tag_condition.rb', line 25

def key
  @key
end

#operationAWSCDK::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

#valueString (readonly)

The value in a key-value pair.

For example, in "ec2:ResourceTag/Department": "accounting", accounting is the value.

Returns:

  • (String)


32
33
34
# File 'backup/tag_condition.rb', line 32

def value
  @value
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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