public static interface CfnGroup.ResourceQueryProperty
For more information about how to construct a query, see Build queries and groups in AWS Resource Groups .
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.resourcegroups.*; ResourceQueryProperty resourceQueryProperty = ResourceQueryProperty.builder() .query(QueryProperty.builder() .resourceTypeFilters(List.of("resourceTypeFilters")) .stackIdentifier("stackIdentifier") .tagFilters(List.of(TagFilterProperty.builder() .key("key") .values(List.of("values")) .build())) .build()) .type("type") .build();
|Modifier and Type||Interface and Description|
A builder for
An implementation for
|Modifier and Type||Method and Description|
The query that defines the membership of the group.
Specifies the type of resource query that determines this group's membership.
default java.lang.Object getQuery()
This is a structure with properties that depend on the
Query structure must be included in the following scenarios:
TAG_FILTERS_1_0, you must specify a
Querystructure that contains a
TagFilterslist of tags. Resources with tags that match those in the
TagFilterlist become members of the resource group.
CLOUDFORMATION_STACK_1_0then this field is required only when you must specify a CloudFormation stack other than the one you are defining. To do this, the
Querystructure must contain the
StackIdentifierproperty. If you don't specify either a
Querystructure or a
Query, then it defaults to the CloudFormation stack that you're currently constructing.
default java.lang.String getType()
TAG_FILTERS_1_0indicates that the group is a tag-based group. To complete the group membership, you must include the
TagFiltersproperty to specify the tag filters to use in the query.
CLOUDFORMATION_STACK_1_0, the default, indicates that the group is a CloudFormation stack-based group. Group membership is based on the CloudFormation stack. You must specify the
StackIdentifierproperty in the query to define which stack to associate the group with, or leave it empty to default to the stack where the group is defined.