Class: AWSCDK::Backup::CfnFramework::ControlScopeProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Backup::CfnFramework::ControlScopeProperty
- Defined in:
- backup/cfn_framework.rb
Overview
A framework consists of one or more controls.
Each control has its own control scope. The control 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. If no scope is specified, evaluations for the rule are triggered when any resource in your recording group changes in configuration.
To set a control scope that includes all of a particular resource, leave the
ControlScopeempty or do not pass it when callingCreateFramework.
Instance Attribute Summary collapse
-
#compliance_resource_ids ⇒ Array<String>?
readonly
The ID of the only AWS resource that you want your control scope to contain.
-
#compliance_resource_types ⇒ Array<String>?
readonly
Describes whether the control scope includes one or more types of resources, such as
EFSorRDS. -
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tag key-value pair applied to those AWS resources that you want to trigger an evaluation for a rule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(compliance_resource_ids: nil, compliance_resource_types: nil, tags: nil) ⇒ ControlScopeProperty
constructor
A new instance of ControlScopeProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(compliance_resource_ids: nil, compliance_resource_types: nil, tags: nil) ⇒ ControlScopeProperty
Returns a new instance of ControlScopeProperty.
639 640 641 642 643 644 645 646 |
# File 'backup/cfn_framework.rb', line 639 def initialize(compliance_resource_ids: nil, compliance_resource_types: nil, tags: nil) @compliance_resource_ids = compliance_resource_ids Jsii::Type.check_type(@compliance_resource_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "complianceResourceIds") unless @compliance_resource_ids.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? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#compliance_resource_ids ⇒ Array<String>? (readonly)
The ID of the only AWS resource that you want your control scope to contain.
652 653 654 |
# File 'backup/cfn_framework.rb', line 652 def compliance_resource_ids @compliance_resource_ids end |
#compliance_resource_types ⇒ Array<String>? (readonly)
Describes whether the control scope includes one or more types of resources, such as EFS or RDS .
657 658 659 |
# File 'backup/cfn_framework.rb', line 657 def compliance_resource_types @compliance_resource_types end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tag key-value pair applied to those AWS resources that you want to trigger an evaluation for a rule.
A maximum of one key-value pair can be provided. The tag value is optional, but it cannot be an empty string if you are creating or editing a framework from the console (though the value can be an empty string when included in a CloudFormation template).
The structure to assign a tag is: [{"Key":"string","Value":"string"}] .
666 667 668 |
# File 'backup/cfn_framework.rb', line 666 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
668 669 670 671 672 673 674 |
# File 'backup/cfn_framework.rb', line 668 def self.jsii_properties { :compliance_resource_ids => "complianceResourceIds", :compliance_resource_types => "complianceResourceTypes", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
676 677 678 679 680 681 682 683 684 |
# File 'backup/cfn_framework.rb', line 676 def to_jsii result = {} result.merge!({ "complianceResourceIds" => @compliance_resource_ids, "complianceResourceTypes" => @compliance_resource_types, "tags" => @tags, }) result.compact end |