Class CfnGroup.ResourceQueryProperty.Builder
java.lang.Object
software.amazon.awscdk.services.resourcegroups.CfnGroup.ResourceQueryProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGroup.ResourceQueryProperty>
- Enclosing interface:
- CfnGroup.ResourceQueryProperty
@Stability(Stable)
public static final class CfnGroup.ResourceQueryProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnGroup.ResourceQueryProperty>
A builder for
CfnGroup.ResourceQueryProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.query
(IResolvable query) Sets the value ofCfnGroup.ResourceQueryProperty.getQuery()
query
(CfnGroup.QueryProperty query) Sets the value ofCfnGroup.ResourceQueryProperty.getQuery()
Sets the value ofCfnGroup.ResourceQueryProperty.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
query
Sets the value ofCfnGroup.ResourceQueryProperty.getQuery()
- Parameters:
query
- The query that defines the membership of the group. This is a structure with properties that depend on theType
.The
Query
structure must be included in the following scenarios:- When the
Type
isTAG_FILTERS_1_0
, you must specify aQuery
structure that contains aTagFilters
list of tags. Resources with tags that match those in theTagFilter
list become members of the resource group. - When the
Type
isCLOUDFORMATION_STACK_1_0
then this field is required only when you must specify a CloudFormation stack other than the one you are defining. To do this, theQuery
structure must contain theStackIdentifier
property. If you don't specify either aQuery
structure or aStackIdentifier
within thatQuery
, then it defaults to the CloudFormation stack that you're currently constructing.
- When the
- Returns:
this
-
query
@Stability(Stable) public CfnGroup.ResourceQueryProperty.Builder query(CfnGroup.QueryProperty query) Sets the value ofCfnGroup.ResourceQueryProperty.getQuery()
- Parameters:
query
- The query that defines the membership of the group. This is a structure with properties that depend on theType
.The
Query
structure must be included in the following scenarios:- When the
Type
isTAG_FILTERS_1_0
, you must specify aQuery
structure that contains aTagFilters
list of tags. Resources with tags that match those in theTagFilter
list become members of the resource group. - When the
Type
isCLOUDFORMATION_STACK_1_0
then this field is required only when you must specify a CloudFormation stack other than the one you are defining. To do this, theQuery
structure must contain theStackIdentifier
property. If you don't specify either aQuery
structure or aStackIdentifier
within thatQuery
, then it defaults to the CloudFormation stack that you're currently constructing.
- When the
- Returns:
this
-
type
Sets the value ofCfnGroup.ResourceQueryProperty.getType()
- Parameters:
type
- Specifies the type of resource query that determines this group's membership. There are two valid query types:.TAG_FILTERS_1_0
indicates that the group is a tag-based group. To complete the group membership, you must include theTagFilters
property 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 theStackIdentifier
property 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.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnGroup.ResourceQueryProperty>
- Returns:
- a new instance of
CfnGroup.ResourceQueryProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-