ResourceScopeProperty Struct
A single resource scope entry within an access grant.
Associates a resource type with optional ARN patterns, tag conditions, and row-level filters.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const resourceScopeProperty: cloudwatch.CfnAccessGrant.ResourceScopeProperty = {
resourceType: 'resourceType',
// the properties below are optional
resourceArns: ['resourceArns'],
rowScopeGroups: [[{
field: 'field',
operator: 'operator',
values: ['values'],
}]],
signalTypes: ['signalTypes'],
tags: {
tagsKey: 'tags',
},
};
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_cloudwatch as cloudwatch
resource_scope_property = cloudwatch.CfnAccessGrant.ResourceScopeProperty(
resource_type="resourceType",
# the properties below are optional
resource_arns=["resourceArns"],
row_scope_groups=[[cloudwatch.CfnAccessGrant.RowScopeProperty(
field="field",
operator="operator",
values=["values"]
)]],
signal_types=["signalTypes"],
tags={
"tags_key": "tags"
}
)
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.cloudwatch.*;
ResourceScopeProperty resourceScopeProperty = ResourceScopeProperty.builder()
.resourceType("resourceType")
// the properties below are optional
.resourceArns(List.of("resourceArns"))
.rowScopeGroups(List.of(List.of(RowScopeProperty.builder()
.field("field")
.operator("operator")
.values(List.of("values"))
.build())))
.signalTypes(List.of("signalTypes"))
.tags(Map.of(
"tagsKey", "tags"))
.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.CloudWatch;
var resourceScopeProperty = new ResourceScopeProperty {
ResourceType = "resourceType",
// the properties below are optional
ResourceArns = new [] { "resourceArns" },
RowScopeGroups = new [] { new [] { new RowScopeProperty {
Field = "field",
Operator = "operator",
Values = new [] { "values" }
} } },
SignalTypes = new [] { "signalTypes" },
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
}
};
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"
resourceScopeProperty := &ResourceScopeProperty{
ResourceType: jsii.String("resourceType"),
// the properties below are optional
ResourceArns: []*string{
jsii.String("resourceArns"),
},
RowScopeGroups: []interface{}{
[]interface{}{
&RowScopeProperty{
Field: jsii.String("field"),
Operator: jsii.String("operator"),
Values: []*string{
jsii.String("values"),
},
},
},
},
SignalTypes: []*string{
jsii.String("signalTypes"),
},
Tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
}
Properties
resourceArnsoptionalstring[]resource_arnsoptionaltyping.List[str]resourceArnsoptionalList<String>ResourceArnsoptionalstring[]ResourceArnsoptional*[]*string #Specific resource ARNs or ARN patterns.
When set, actions are limited to these resources. When absent, defaults to all resources of the type.
resourceTypestringresource_typestrresourceTypeStringResourceTypestringResourceType*string required #The resource type name, for example DataSet or OmniDashboard.
rowScopeGroupsoptionalIResolvable | IResolvable | IResolvable | CfnAccessGrant.RowScopeProperty[][]row_scope_groupsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, typing.List[typing.Union[IResolvable, RowScopeProperty]]]]]rowScopeGroupsoptionalIResolvableRowScopeGroupsoptionalIResolvableRowScopeGroupsoptionalinterface{} #Row-level filters for this scope, as an OR of AND-groups: a row is visible when it matches every filter in any one group.
Requires SignalTypes.
signalTypesoptionalstring[]signal_typesoptionaltyping.List[str]signalTypesoptionalList<String>SignalTypesoptionalstring[]SignalTypesoptional*[]*string #Signal types this scope's row filtering applies to.
Required when RowScopeGroups is set.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #Tag-based conditions for dynamic resource scoping.
Access applies only to resources carrying all of the specified tag key-value pairs.