Class: AWSCDK::FMS::CfnPolicy::PolicyTagProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
fms/cfn_policy.rb

Overview

A collection of key:value pairs associated with an AWS resource.

The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:) ⇒ PolicyTagProperty

Returns a new instance of PolicyTagProperty.

Parameters:

  • key (String)

    Part of the key:value pair that defines a tag.

  • value (String)

    Part of the key:value pair that defines a tag.



1137
1138
1139
1140
1141
1142
# File 'fms/cfn_policy.rb', line 1137

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

#keyString (readonly)

Part of the key:value pair that defines a tag.

You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.



1150
1151
1152
# File 'fms/cfn_policy.rb', line 1150

def key
  @key
end

#valueString (readonly)

Part of the key:value pair that defines a tag.

You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.



1157
1158
1159
# File 'fms/cfn_policy.rb', line 1157

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1159
1160
1161
1162
1163
1164
# File 'fms/cfn_policy.rb', line 1159

def self.jsii_properties
  {
    :key => "key",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



1166
1167
1168
1169
1170
1171
1172
1173
# File 'fms/cfn_policy.rb', line 1166

def to_jsii
  result = {}
  result.merge!({
    "key" => @key,
    "value" => @value,
  })
  result.compact
end