@Stability(value=Stable)
public static interface CfnGroup.TagFilterProperty
extends software.amazon.jsii.JsiiSerializable
An AWS resource that doesn't have a matching tag key and value is rejected as a member of the group.
A TagFilter object includes two properties: Key (a string) and Values (a list of strings). Only resources in the account that are tagged with a matching key-value pair are members of the group. The Values property of TagFilter is optional, but specifying it narrows the query results.
As an example, suppose the TagFilters string is [{"Key": "Stage", "Values": ["Test", "Beta"]}, {"Key": "Storage"}] . In this case, only resources with all of the following tags are members of the group:
Stage tag key with a value of either Test or BetaStorage tag key with any valueExample:
// 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.*;
TagFilterProperty tagFilterProperty = TagFilterProperty.builder()
.key("key")
.values(List.of("values"))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnGroup.TagFilterProperty.Builder
A builder for
CfnGroup.TagFilterProperty |
static class |
CfnGroup.TagFilterProperty.Jsii$Proxy
An implementation for
CfnGroup.TagFilterProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnGroup.TagFilterProperty.Builder |
builder() |
default String |
getKey()
A string that defines a tag key.
|
default List<String> |
getValues()
A list of tag values that can be included in the tag-based resource group.
|
@Stability(value=Stable) @Nullable default String getKey()
Only resources in the account that are tagged with a specified tag key are members of the tag-based resource group.
This field is required when the ResourceQuery structure's Type property is TAG_FILTERS_1_0 . You must specify at least one tag key.
@Stability(value=Stable) @Nullable default List<String> getValues()
This is optional. If you don't specify a value or values for a key, then an AWS resource with any value for that key is a member.
@Stability(value=Stable) static CfnGroup.TagFilterProperty.Builder builder()
CfnGroup.TagFilterProperty.Builder of CfnGroup.TagFilterPropertyCopyright © 2022. All rights reserved.