Skip to content
v2.278.0

BackupSelectionResourceTypeProperty Struct ​

Specifies an object containing properties used to assign a set of resources to a backup plan.

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';

declare const conditions: any;
const backupSelectionResourceTypeProperty: backup.CfnBackupSelection.BackupSelectionResourceTypeProperty = {
  iamRoleArn: 'iamRoleArn',
  selectionName: 'selectionName',

  // the properties below are optional
  conditions: conditions,
  listOfTags: [{
    conditionKey: 'conditionKey',
    conditionType: 'conditionType',
    conditionValue: 'conditionValue',
  }],
  notResources: ['notResources'],
  resources: ['resources'],
};
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: Any

backup_selection_resource_type_property = backup.CfnBackupSelection.BackupSelectionResourceTypeProperty(
    iam_role_arn="iamRoleArn",
    selection_name="selectionName",

    # the properties below are optional
    conditions=conditions,
    list_of_tags=[backup.CfnBackupSelection.ConditionResourceTypeProperty(
        condition_key="conditionKey",
        condition_type="conditionType",
        condition_value="conditionValue"
    )],
    not_resources=["notResources"],
    resources=["resources"]
)
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.*;

Object conditions;

BackupSelectionResourceTypeProperty backupSelectionResourceTypeProperty = BackupSelectionResourceTypeProperty.builder()
        .iamRoleArn("iamRoleArn")
        .selectionName("selectionName")

        // the properties below are optional
        .conditions(conditions)
        .listOfTags(List.of(ConditionResourceTypeProperty.builder()
                .conditionKey("conditionKey")
                .conditionType("conditionType")
                .conditionValue("conditionValue")
                .build()))
        .notResources(List.of("notResources"))
        .resources(List.of("resources"))
        .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 conditions;

var backupSelectionResourceTypeProperty = new BackupSelectionResourceTypeProperty {
    IamRoleArn = "iamRoleArn",
    SelectionName = "selectionName",

    // the properties below are optional
    Conditions = conditions,
    ListOfTags = new [] { new ConditionResourceTypeProperty {
        ConditionKey = "conditionKey",
        ConditionType = "conditionType",
        ConditionValue = "conditionValue"
    } },
    NotResources = new [] { "notResources" },
    Resources = new [] { "resources" }
};
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"

var conditions interface{}

backupSelectionResourceTypeProperty := &BackupSelectionResourceTypeProperty{
	IamRoleArn: jsii.String("iamRoleArn"),
	SelectionName: jsii.String("selectionName"),

	// the properties below are optional
	Conditions: conditions,
	ListOfTags: []interface{}{
		&ConditionResourceTypeProperty{
			ConditionKey: jsii.String("conditionKey"),
			ConditionType: jsii.String("conditionType"),
			ConditionValue: jsii.String("conditionValue"),
		},
	},
	NotResources: []*string{
		jsii.String("notResources"),
	},
	Resources: []*string{
		jsii.String("resources"),
	},
}

Properties ​

conditionsoptionalanyconditionsoptionalAnyconditionsoptionalObjectConditionsoptionalobjectConditionsoptionalinterface{} #
A list of conditions that you define to assign resources to your backup plans using tags.
notes

For example, "StringEquals": { "ConditionKey": "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" }, . Condition operators are case sensitive.

Conditions differs from ListOfTags as follows:

  • When you specify more than one condition, you only assign the resources that match ALL conditions (using AND logic).
  • Conditions supports StringEquals , StringLike , StringNotEquals , and StringNotLike . ListOfTags only supports StringEquals .
iamRoleArnstringiam_role_arnstriamRoleArnStringIamRoleArnstringIamRoleArn*string required #
The ARN of the IAM role that AWS Backup uses to authenticate when backing up the target resource;

for example, arn:aws:iam::123456789012:role/S3Access .

listOfTagsoptionalIResolvable | IResolvable | CfnBackupSelection.ConditionResourceTypeProperty[]list_of_tagsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ConditionResourceTypeProperty]]]listOfTagsoptionalIResolvableListOfTagsoptionalIResolvableListOfTagsoptionalinterface{} #
A list of conditions that you define to assign resources to your backup plans using tags.
notes

For example, "StringEquals": { "ConditionKey": "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" }, . Condition operators are case sensitive.

ListOfTags differs from Conditions as follows:

  • When you specify more than one condition, you assign all resources that match AT LEAST ONE condition (using OR logic).
  • ListOfTags only supports StringEquals . Conditions supports StringEquals , StringLike , StringNotEquals , and StringNotLike .
notResourcesoptionalstring[]not_resourcesoptionaltyping.List[str]notResourcesoptionalList<String>NotResourcesoptionalstring[]NotResourcesoptional*[]*string #
A list of Amazon Resource Names (ARNs) to exclude from a backup plan.
notes

The maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

If you need to exclude many resources from a backup plan, consider a different resource selection strategy, such as assigning only one or a few resource types or refining your resource selection using tags.

resourcesoptionalstring[]resourcesoptionaltyping.List[str]resourcesoptionalList<String>Resourcesoptionalstring[]Resourcesoptional*[]*string #
An array of strings that contain Amazon Resource Names (ARNs) of resources to assign to a backup plan.
selectionNamestringselection_namestrselectionNameStringSelectionNamestringSelectionName*string required #
The display name of a resource selection document.