Interface BackupSelectionOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
BackupSelectionProps
- All Known Implementing Classes:
BackupSelectionOptions.Jsii$Proxy,BackupSelectionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:31.916Z")
@Stability(Stable)
public interface BackupSelectionOptions
extends software.amazon.jsii.JsiiSerializable
Options for a BackupSelection.
Example:
BackupPlan plan;
Vpc vpc;
ITable myTable = Table.fromTableName(this, "Table", "myTableName");
DatabaseInstance myDatabaseInstance = DatabaseInstance.Builder.create(this, "DatabaseInstance")
.engine(DatabaseInstanceEngine.mysql(MySqlInstanceEngineProps.builder().version(MysqlEngineVersion.VER_8_0_26).build()))
.vpc(vpc)
.build();
DatabaseCluster myDatabaseCluster = DatabaseCluster.Builder.create(this, "DatabaseCluster")
.engine(DatabaseClusterEngine.auroraMysql(AuroraMysqlClusterEngineProps.builder().version(AuroraMysqlEngineVersion.VER_2_08_1).build()))
.credentials(Credentials.fromGeneratedSecret("clusteradmin"))
.instanceProps(InstanceProps.builder()
.vpc(vpc)
.build())
.build();
ServerlessCluster myServerlessCluster = ServerlessCluster.Builder.create(this, "ServerlessCluster")
.engine(DatabaseClusterEngine.AURORA_POSTGRESQL)
.parameterGroup(ParameterGroup.fromParameterGroupName(this, "ParameterGroup", "default.aurora-postgresql11"))
.vpc(vpc)
.build();
Construct myCoolConstruct = new Construct(this, "MyCoolConstruct");
plan.addSelection("Selection", BackupSelectionOptions.builder()
.resources(List.of(BackupResource.fromDynamoDbTable(myTable), BackupResource.fromRdsDatabaseInstance(myDatabaseInstance), BackupResource.fromRdsDatabaseCluster(myDatabaseCluster), BackupResource.fromRdsServerlessCluster(myServerlessCluster), BackupResource.fromTag("stage", "prod"), BackupResource.fromConstruct(myCoolConstruct)))
.build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forBackupSelectionOptionsstatic final classAn implementation forBackupSelectionOptions -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanWhether to automatically give restores permissions to the role that AWS Backup uses.default StringThe name for this selection.default BooleanWhether to disable automatically assigning default backup permissions to the role that AWS Backup uses.The resources to backup.default IRolegetRole()The role that AWS Backup uses to authenticate when backuping or restoring the resources.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getResources
The resources to backup.Use the helper static methods defined on
BackupResource. -
getAllowRestores
Whether to automatically give restores permissions to the role that AWS Backup uses.If
true, theAWSBackupServiceRolePolicyForRestoresmanaged policy will be attached to the role.Default: false
-
getBackupSelectionName
The name for this selection.Default: - a CDK generated name
-
getDisableDefaultBackupPolicy
Whether to disable automatically assigning default backup permissions to the role that AWS Backup uses.If
false, theAWSBackupServiceRolePolicyForBackupmanaged policy will be attached to the role.Default: false
-
getRole
The role that AWS Backup uses to authenticate when backuping or restoring the resources.The
AWSBackupServiceRolePolicyForBackupmanaged policy will be attached to this role unlessdisableDefaultBackupPolicyis set totrue.Default: - a new role will be created
-
builder
- Returns:
- a
BackupSelectionOptions.BuilderofBackupSelectionOptions
-