ScopeProperty Struct
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.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_config as config } from 'aws-cdk-lib';
const scopeProperty: config.CfnConfigRule.ScopeProperty = {
complianceResourceId: 'complianceResourceId',
complianceResourceTypes: ['complianceResourceTypes'],
tagKey: 'tagKey',
tagValue: 'tagValue',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_config as config
scope_property = config.CfnConfigRule.ScopeProperty(
compliance_resource_id="complianceResourceId",
compliance_resource_types=["complianceResourceTypes"],
tag_key="tagKey",
tag_value="tagValue"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.config.*;
ScopeProperty scopeProperty = ScopeProperty.builder()
.complianceResourceId("complianceResourceId")
.complianceResourceTypes(List.of("complianceResourceTypes"))
.tagKey("tagKey")
.tagValue("tagValue")
.build();
csharp
// 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.Config;
var scopeProperty = new ScopeProperty {
ComplianceResourceId = "complianceResourceId",
ComplianceResourceTypes = new [] { "complianceResourceTypes" },
TagKey = "tagKey",
TagValue = "tagValue"
};
go
// 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"
scopeProperty := &ScopeProperty{
ComplianceResourceId: jsii.String("complianceResourceId"),
ComplianceResourceTypes: []*string{
jsii.String("complianceResourceTypes"),
},
TagKey: jsii.String("tagKey"),
TagValue: jsii.String("tagValue"),
}
Properties
complianceResourceIdoptionalstringcompliance_resource_idoptionalstrcomplianceResourceIdoptionalStringComplianceResourceIdoptionalstringComplianceResourceIdoptional*string#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 .
complianceResourceTypesoptionalstring[]compliance_resource_typesoptionaltyping.List[str]complianceResourceTypesoptionalList<String>ComplianceResourceTypesoptionalstring[]ComplianceResourceTypesoptional*[]*string#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 .
tagKeyoptionalstringtag_keyoptionalstrtagKeyoptionalStringTagKeyoptionalstringTagKeyoptional*string#The tag key that is applied to only those AWS resources that you want to trigger an evaluation for the rule.
tagValueoptionalstringtag_valueoptionalstrtagValueoptionalStringTagValueoptionalstringTagValueoptional*string#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 .