Class: AWSCDK::Config::CfnConfigRule::ScopeProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
config/cfn_config_rule.rb

Overview

Defines which resources trigger an evaluation for an AWS Config rule.

The scope can include one or more resource types, a combination of a tag key and value, or a combination of one resource type and one resource ID. Specify a scope to constrain which resources trigger an evaluation for a rule. Otherwise, evaluations for the rule are triggered when any resource in your recording group changes in configuration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(compliance_resource_id: nil, compliance_resource_types: nil, tag_key: nil, tag_value: nil) ⇒ ScopeProperty

Returns a new instance of ScopeProperty.

Parameters:

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

    The ID of the only AWS resource that you want to trigger an evaluation for the rule.

  • compliance_resource_types (Array<String>, nil) (defaults to: nil)

    The resource types of only those AWS resources that you want to trigger an evaluation for the rule.

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

    The tag key that is applied to only those AWS resources that you want to trigger an evaluation for the rule.

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

    The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule.



775
776
777
778
779
780
781
782
783
784
# File 'config/cfn_config_rule.rb', line 775

def initialize(compliance_resource_id: nil, compliance_resource_types: nil, tag_key: nil, tag_value: nil)
  @compliance_resource_id = compliance_resource_id
  Jsii::Type.check_type(@compliance_resource_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "complianceResourceId") unless @compliance_resource_id.nil?
  @compliance_resource_types = compliance_resource_types
  Jsii::Type.check_type(@compliance_resource_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "complianceResourceTypes") unless @compliance_resource_types.nil?
  @tag_key = tag_key
  Jsii::Type.check_type(@tag_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tagKey") unless @tag_key.nil?
  @tag_value = tag_value
  Jsii::Type.check_type(@tag_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tagValue") unless @tag_value.nil?
end

Instance Attribute Details

#compliance_resource_idString? (readonly)

The ID of the only AWS resource that you want to trigger an evaluation for the rule.

If you specify a resource ID, you must specify one resource type for ComplianceResourceTypes .



792
793
794
# File 'config/cfn_config_rule.rb', line 792

def compliance_resource_id
  @compliance_resource_id
end

#compliance_resource_typesArray<String>? (readonly)

The resource types of only those AWS resources that you want to trigger an evaluation for the rule.

You can only specify one type if you also specify a resource ID for ComplianceResourceId .



799
800
801
# File 'config/cfn_config_rule.rb', line 799

def compliance_resource_types
  @compliance_resource_types
end

#tag_keyString? (readonly)

The tag key that is applied to only those AWS resources that you want to trigger an evaluation for the rule.



804
805
806
# File 'config/cfn_config_rule.rb', line 804

def tag_key
  @tag_key
end

#tag_valueString? (readonly)

The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule.

If you specify a value for TagValue , you must also specify a value for TagKey .



811
812
813
# File 'config/cfn_config_rule.rb', line 811

def tag_value
  @tag_value
end

Class Method Details

.jsii_propertiesObject



813
814
815
816
817
818
819
820
# File 'config/cfn_config_rule.rb', line 813

def self.jsii_properties
  {
    :compliance_resource_id => "complianceResourceId",
    :compliance_resource_types => "complianceResourceTypes",
    :tag_key => "tagKey",
    :tag_value => "tagValue",
  }
end

Instance Method Details

#to_jsiiObject



822
823
824
825
826
827
828
829
830
831
# File 'config/cfn_config_rule.rb', line 822

def to_jsii
  result = {}
  result.merge!({
    "complianceResourceId" => @compliance_resource_id,
    "complianceResourceTypes" => @compliance_resource_types,
    "tagKey" => @tag_key,
    "tagValue" => @tag_value,
  })
  result.compact
end