Class: AWSCDK::FMS::CfnPolicy::ResourceTagProperty

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

Overview

The resource tags that AWS Firewall Manager uses to determine if a particular resource should be included or excluded from the AWS Firewall Manager policy.

Tags enable you to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value. Firewall Manager combines the tags with "AND" so that, if you add more than one tag to a policy scope, a resource must have all the specified tags to be included or excluded. For more information, see Working with Tag Editor .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value: nil) ⇒ ResourceTagProperty

Returns a new instance of ResourceTagProperty.

Parameters:

  • key (String)

    The resource tag key.

  • value (String, nil) (defaults to: nil)

    The resource tag value.



1229
1230
1231
1232
1233
1234
# File 'fms/cfn_policy.rb', line 1229

def initialize(key:, value: 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") unless @value.nil?
end

Instance Attribute Details

#keyString (readonly)

The resource tag key.



1240
1241
1242
# File 'fms/cfn_policy.rb', line 1240

def key
  @key
end

#valueString? (readonly)

The resource tag value.



1245
1246
1247
# File 'fms/cfn_policy.rb', line 1245

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1247
1248
1249
1250
1251
1252
# File 'fms/cfn_policy.rb', line 1247

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

Instance Method Details

#to_jsiiObject



1254
1255
1256
1257
1258
1259
1260
1261
# File 'fms/cfn_policy.rb', line 1254

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