Class: AWSCDK::Config::RuleScope
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::Config::RuleScope
- Defined in:
- config/rule_scope.rb
Overview
Determines which resources trigger an evaluation of an AWS Config rule.
Class Method Summary collapse
-
.from_resource(resource_type, resource_id = nil) ⇒ AWSCDK::Config::RuleScope
restricts scope of changes to a specific resource type or resource identifier.
-
.from_resources(resource_types) ⇒ AWSCDK::Config::RuleScope
restricts scope of changes to specific resource types.
-
.from_tag(key, value = nil) ⇒ AWSCDK::Config::RuleScope
restricts scope of changes to a specific tag.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize(*args) ⇒ RuleScope
constructor
A new instance of RuleScope.
-
#key ⇒ String?
tag key applied to resources that will trigger evaluation of a rule.
-
#resource_id ⇒ String?
ID of the only AWS resource that will trigger evaluation of a rule.
-
#resource_types ⇒ Array<AWSCDK::Config::ResourceType>?
Resource types that will trigger evaluation of a rule.
-
#value ⇒ String?
tag value applied to resources that will trigger evaluation of a rule.
Constructor Details
#initialize(*args) ⇒ RuleScope
Returns a new instance of RuleScope.
8 9 10 |
# File 'config/rule_scope.rb', line 8 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_config.RuleScope does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.from_resource(resource_type, resource_id = nil) ⇒ AWSCDK::Config::RuleScope
restricts scope of changes to a specific resource type or resource identifier.
26 27 28 29 30 |
# File 'config/rule_scope.rb', line 26 def self.from_resource(resource_type, resource_id = nil) Jsii::Type.check_type(resource_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29uZmlnLlJlc291cmNlVHlwZSJ9")), "resourceType") Jsii::Type.check_type(resource_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceId") unless resource_id.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_config.RuleScope", "fromResource", [resource_type, resource_id]) end |
.from_resources(resource_types) ⇒ AWSCDK::Config::RuleScope
restricts scope of changes to specific resource types.
36 37 38 39 |
# File 'config/rule_scope.rb', line 36 def self.from_resources(resource_types) Jsii::Type.check_type(resource_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb25maWcuUmVzb3VyY2VUeXBlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "resourceTypes") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_config.RuleScope", "fromResources", [resource_types]) end |
.from_tag(key, value = nil) ⇒ AWSCDK::Config::RuleScope
restricts scope of changes to a specific tag.
46 47 48 49 50 |
# File 'config/rule_scope.rb', line 46 def self.from_tag(key, value = nil) Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") unless value.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_config.RuleScope", "fromTag", [key, value]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'config/rule_scope.rb', line 12 def self.jsii_overridable_methods { :key => { kind: :property, name: "key", is_optional: true }, :resource_id => { kind: :property, name: "resourceId", is_optional: true }, :resource_types => { kind: :property, name: "resourceTypes", is_optional: true }, :value => { kind: :property, name: "value", is_optional: true }, } end |
Instance Method Details
#key ⇒ String?
tag key applied to resources that will trigger evaluation of a rule.
55 56 57 |
# File 'config/rule_scope.rb', line 55 def key() jsii_get_property("key") end |
#resource_id ⇒ String?
ID of the only AWS resource that will trigger evaluation of a rule.
62 63 64 |
# File 'config/rule_scope.rb', line 62 def resource_id() jsii_get_property("resourceId") end |
#resource_types ⇒ Array<AWSCDK::Config::ResourceType>?
Resource types that will trigger evaluation of a rule.
69 70 71 |
# File 'config/rule_scope.rb', line 69 def resource_types() jsii_get_property("resourceTypes") end |
#value ⇒ String?
tag value applied to resources that will trigger evaluation of a rule.
76 77 78 |
# File 'config/rule_scope.rb', line 76 def value() jsii_get_property("value") end |