Class: AWSCDK::Config::CfnConfigurationRecorder::ExclusionByResourceTypesProperty

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

Overview

Specifies whether the configuration recorder excludes certain resource types from being recorded.

Use the ResourceTypes field to enter a comma-separated list of resource types you want to exclude from recording.

By default, when AWS Config adds support for a new resource type in the Region where you set up the configuration recorder, including global resource types, AWS Config starts recording resources of that type automatically.

How to use the exclusion recording strategy

To use this option, you must set the use_only field of RecordingStrategy to EXCLUSION_BY_RESOURCE_TYPES .

AWS Config will then record configuration changes for all supported resource types, except the resource types that you specify to exclude from being recorded.

Global resource types and the exclusion recording strategy

Unless specifically listed as exclusions, AWS::RDS::GlobalCluster will be recorded automatically in all supported AWS Config Regions were the configuration recorder is enabled.

IAM users, groups, roles, and customer managed policies will be recorded in the Region where you set up the configuration recorder if that is a Region where AWS Config was available before February 2022. You cannot be record the global IAM resouce types in Regions supported by AWS Config after February 2022. This list where you cannot record the global IAM resource types includes the following Regions:

  • Asia Pacific (Hyderabad)
  • Asia Pacific (Melbourne)
  • Canada West (Calgary)
  • Europe (Spain)
  • Europe (Zurich)
  • Israel (Tel Aviv)
  • Middle East (UAE)

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_types:) ⇒ ExclusionByResourceTypesProperty

Returns a new instance of ExclusionByResourceTypesProperty.

Parameters:

  • resource_types (Array<String>)

    A comma-separated list of resource types to exclude from recording by the configuration recorder.



579
580
581
582
# File 'config/cfn_configuration_recorder.rb', line 579

def initialize(resource_types:)
  @resource_types = resource_types
  Jsii::Type.check_type(@resource_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "resourceTypes")
end

Instance Attribute Details

#resource_typesArray<String> (readonly)

A comma-separated list of resource types to exclude from recording by the configuration recorder.



588
589
590
# File 'config/cfn_configuration_recorder.rb', line 588

def resource_types
  @resource_types
end

Class Method Details

.jsii_propertiesObject



590
591
592
593
594
# File 'config/cfn_configuration_recorder.rb', line 590

def self.jsii_properties
  {
    :resource_types => "resourceTypes",
  }
end

Instance Method Details

#to_jsiiObject



596
597
598
599
600
601
602
# File 'config/cfn_configuration_recorder.rb', line 596

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