ControlScopeProperty Struct
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.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_backup as backup } from 'aws-cdk-lib';
const controlScopeProperty: backup.CfnFramework.ControlScopeProperty = {
complianceResourceIds: ['complianceResourceIds'],
complianceResourceTypes: ['complianceResourceTypes'],
tags: [{
key: 'key',
value: 'value',
}],
};
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_backup as backup
control_scope_property = backup.CfnFramework.ControlScopeProperty(
compliance_resource_ids=["complianceResourceIds"],
compliance_resource_types=["complianceResourceTypes"],
tags=[CfnTag(
key="key",
value="value"
)]
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.backup.*;
ControlScopeProperty controlScopeProperty = ControlScopeProperty.builder()
.complianceResourceIds(List.of("complianceResourceIds"))
.complianceResourceTypes(List.of("complianceResourceTypes"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Backup;
var controlScopeProperty = new ControlScopeProperty {
ComplianceResourceIds = new [] { "complianceResourceIds" },
ComplianceResourceTypes = new [] { "complianceResourceTypes" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
controlScopeProperty := &ControlScopeProperty{
ComplianceResourceIds: []*string{
jsii.String("complianceResourceIds"),
},
ComplianceResourceTypes: []*string{
jsii.String("complianceResourceTypes"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
complianceResourceIdsoptionalstring[]compliance_resource_idsoptionaltyping.List[str]complianceResourceIdsoptionalList<String>ComplianceResourceIdsoptionalstring[]ComplianceResourceIdsoptional*[]*string#complianceResourceTypesoptionalstring[]compliance_resource_typesoptionaltyping.List[str]complianceResourceTypesoptionalList<String>ComplianceResourceTypesoptionalstring[]ComplianceResourceTypesoptional*[]*string#tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#notes
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"}] .