CfnBackupSelectionProps Struct
Properties for defining a CfnBackupSelection.
| Source | |
|---|---|
| Type last changed |
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 cfnBackupSelectionProps: backup.CfnBackupSelectionProps = {
backupPlanId: 'backupPlanId',
backupSelection: {
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
cfn_backup_selection_props = backup.CfnBackupSelectionProps(
backup_plan_id="backupPlanId",
backup_selection=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;
CfnBackupSelectionProps cfnBackupSelectionProps = CfnBackupSelectionProps.builder()
.backupPlanId("backupPlanId")
.backupSelection(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())
.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 cfnBackupSelectionProps = new CfnBackupSelectionProps {
BackupPlanId = "backupPlanId",
BackupSelection = 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{}
cfnBackupSelectionProps := &CfnBackupSelectionProps{
BackupPlanId: jsii.String("backupPlanId"),
BackupSelection: &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
backupPlanIdstring | IBackupPlanRefbackup_plan_idtyping.Union[str, IBackupPlanRef]backupPlanIdStringBackupPlanIdstringBackupPlanIdinterface{} required #Uniquely identifies a backup plan.
backupSelectionIResolvable | CfnBackupSelection.backup_selectiontyping.Union[IResolvable, BackupSelectionResourceTypeProperty]backupSelectionIResolvableBackupSelectionIResolvableBackupSelectioninterface{} required #Specifies the body of a request to assign a set of resources to a backup plan.
It includes an array of resources, an optional array of patterns to exclude resources, an optional role to provide access to the AWS service the resource belongs to, and an optional array of tags used to identify a set of resources.