Skip to content
v2.278.0

TagCondition Struct ​

A tag condition.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_backup as backup } from 'aws-cdk-lib';
const tagCondition: backup.TagCondition = {
  key: 'key',
  value: 'value',

  // the properties below are optional
  operation: backup.TagOperation.STRING_EQUALS,
};
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_backup as backup

tag_condition = backup.TagCondition(
    key="key",
    value="value",

    # the properties below are optional
    operation=backup.TagOperation.STRING_EQUALS
)
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.backup.*;

TagCondition tagCondition = TagCondition.builder()
        .key("key")
        .value("value")

        // the properties below are optional
        .operation(TagOperation.STRING_EQUALS)
        .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.Backup;

var tagCondition = new TagCondition {
    Key = "key",
    Value = "value",

    // the properties below are optional
    Operation = TagOperation.STRING_EQUALS
};
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"

tagCondition := &TagCondition{
	Key: jsii.String("key"),
	Value: jsii.String("value"),

	// the properties below are optional
	Operation: awscdk.Aws_backup.TagOperation_STRING_EQUALS,
}

Properties ​

keystringkeystrkeyStringKeystringKey*string required #
The key in a key-value pair.

For example, in "ec2:ResourceTag/Department": "accounting", ec2:ResourceTag/Department is the key.

operationoptionalTagOperationoperationoptionalTagOperationoperationoptionalTagOperationOperationoptionalTagOperationOperationoptionalTagOperation = STRING_EQUALS #
An operation that is applied to a key-value pair used to filter resources in a selection.
valuestringvaluestrvalueStringValuestringValue*string required #
The value in a key-value pair.

For example, in "ec2:ResourceTag/Department": "accounting", accounting is the value.