Skip to content
v2.278.0

ConditionsProperty Struct ​

Contains information about which resources to include or exclude from a backup plan using their tags.

Conditions are case sensitive.

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 conditionsProperty: backup.CfnBackupSelection.ConditionsProperty = {
  stringEquals: [{
    conditionKey: 'conditionKey',
    conditionValue: 'conditionValue',
  }],
  stringLike: [{
    conditionKey: 'conditionKey',
    conditionValue: 'conditionValue',
  }],
  stringNotEquals: [{
    conditionKey: 'conditionKey',
    conditionValue: 'conditionValue',
  }],
  stringNotLike: [{
    conditionKey: 'conditionKey',
    conditionValue: 'conditionValue',
  }],
};
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

conditions_property = backup.CfnBackupSelection.ConditionsProperty(
    string_equals=[backup.CfnBackupSelection.ConditionParameterProperty(
        condition_key="conditionKey",
        condition_value="conditionValue"
    )],
    string_like=[backup.CfnBackupSelection.ConditionParameterProperty(
        condition_key="conditionKey",
        condition_value="conditionValue"
    )],
    string_not_equals=[backup.CfnBackupSelection.ConditionParameterProperty(
        condition_key="conditionKey",
        condition_value="conditionValue"
    )],
    string_not_like=[backup.CfnBackupSelection.ConditionParameterProperty(
        condition_key="conditionKey",
        condition_value="conditionValue"
    )]
)
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.*;

ConditionsProperty conditionsProperty = ConditionsProperty.builder()
        .stringEquals(List.of(ConditionParameterProperty.builder()
                .conditionKey("conditionKey")
                .conditionValue("conditionValue")
                .build()))
        .stringLike(List.of(ConditionParameterProperty.builder()
                .conditionKey("conditionKey")
                .conditionValue("conditionValue")
                .build()))
        .stringNotEquals(List.of(ConditionParameterProperty.builder()
                .conditionKey("conditionKey")
                .conditionValue("conditionValue")
                .build()))
        .stringNotLike(List.of(ConditionParameterProperty.builder()
                .conditionKey("conditionKey")
                .conditionValue("conditionValue")
                .build()))
        .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 conditionsProperty = new ConditionsProperty {
    StringEquals = new [] { new ConditionParameterProperty {
        ConditionKey = "conditionKey",
        ConditionValue = "conditionValue"
    } },
    StringLike = new [] { new ConditionParameterProperty {
        ConditionKey = "conditionKey",
        ConditionValue = "conditionValue"
    } },
    StringNotEquals = new [] { new ConditionParameterProperty {
        ConditionKey = "conditionKey",
        ConditionValue = "conditionValue"
    } },
    StringNotLike = new [] { new ConditionParameterProperty {
        ConditionKey = "conditionKey",
        ConditionValue = "conditionValue"
    } }
};
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"

conditionsProperty := &ConditionsProperty{
	StringEquals: []interface{}{
		&ConditionParameterProperty{
			ConditionKey: jsii.String("conditionKey"),
			ConditionValue: jsii.String("conditionValue"),
		},
	},
	StringLike: []interface{}{
		&ConditionParameterProperty{
			ConditionKey: jsii.String("conditionKey"),
			ConditionValue: jsii.String("conditionValue"),
		},
	},
	StringNotEquals: []interface{}{
		&ConditionParameterProperty{
			ConditionKey: jsii.String("conditionKey"),
			ConditionValue: jsii.String("conditionValue"),
		},
	},
	StringNotLike: []interface{}{
		&ConditionParameterProperty{
			ConditionKey: jsii.String("conditionKey"),
			ConditionValue: jsii.String("conditionValue"),
		},
	},
}

Properties ​

stringEqualsoptionalIResolvable | IResolvable | CfnBackupSelection.ConditionParameterProperty[]string_equalsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ConditionParameterProperty]]]stringEqualsoptionalIResolvableStringEqualsoptionalIResolvableStringEqualsoptionalinterface{} #
Filters the values of your tagged resources for only those resources that you tagged with the same value.

Also called "exact matching."

stringLikeoptionalIResolvable | IResolvable | CfnBackupSelection.ConditionParameterProperty[]string_likeoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ConditionParameterProperty]]]stringLikeoptionalIResolvableStringLikeoptionalIResolvableStringLikeoptionalinterface{} #
Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string.

For example, "prod*" or "rod" matches the tag value "production".

stringNotEqualsoptionalIResolvable | IResolvable | CfnBackupSelection.ConditionParameterProperty[]string_not_equalsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ConditionParameterProperty]]]stringNotEqualsoptionalIResolvableStringNotEqualsoptionalIResolvableStringNotEqualsoptionalinterface{} #
Filters the values of your tagged resources for only those resources that you tagged that do not have the same value.

Also called "negated matching."

stringNotLikeoptionalIResolvable | IResolvable | CfnBackupSelection.ConditionParameterProperty[]string_not_likeoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ConditionParameterProperty]]]stringNotLikeoptionalIResolvableStringNotLikeoptionalIResolvableStringNotLikeoptionalinterface{} #
Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string.