Show / Hide Table of Contents

Class CfnGroup.TagFilterProperty

Specifies a single tag key and optional values that you can use to specify membership in a tag-based group.

Inheritance
System.Object
CfnGroup.TagFilterProperty
Implements
CfnGroup.ITagFilterProperty
Namespace: Amazon.CDK.AWS.ResourceGroups
Assembly: Amazon.CDK.AWS.ResourceGroups.dll
Syntax (csharp)
public class TagFilterProperty : Object, CfnGroup.ITagFilterProperty
Syntax (vb)
Public Class TagFilterProperty
    Inherits Object
    Implements CfnGroup.ITagFilterProperty
Remarks

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:

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-tagfilter.html

    ExampleMetadata: fixture=_generated

    Examples
    // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    using Amazon.CDK.AWS.ResourceGroups;
    
    TagFilterProperty tagFilterProperty = new TagFilterProperty {
        Key = "key",
        Values = new [] { "values" }
    };

    Synopsis

    Constructors

    TagFilterProperty()

    Properties

    Key

    A string that defines a tag key.

    Values

    A list of tag values that can be included in the tag-based resource group.

    Constructors

    TagFilterProperty()

    public TagFilterProperty()

    Properties

    Key

    A string that defines a tag key.

    public string Key { get; set; }
    Property Value

    System.String

    Remarks

    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.

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-tagfilter.html#cfn-resourcegroups-group-tagfilter-key

    Values

    A list of tag values that can be included in the tag-based resource group.

    public string[] Values { get; set; }
    Property Value

    System.String[]

    Remarks

    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.

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resourcegroups-group-tagfilter.html#cfn-resourcegroups-group-tagfilter-values

    Implements

    CfnGroup.ITagFilterProperty
    Back to top Generated by DocFX