Show / Hide Table of Contents

Interface IBackupSelectionOptions

Options for a BackupSelection.

Namespace: Amazon.CDK.AWS.Backup
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IBackupSelectionOptions
Syntax (vb)
Public Interface IBackupSelectionOptions
Remarks

ExampleMetadata: infused

Examples
BackupPlan plan;
            Vpc vpc;

            var myTable = Table.FromTableName(this, "Table", "myTableName");
            var myDatabaseInstance = new DatabaseInstance(this, "DatabaseInstance", new DatabaseInstanceProps {
                Engine = DatabaseInstanceEngine.Mysql(new MySqlInstanceEngineProps { Version = MysqlEngineVersion.VER_8_0_26 }),
                Vpc = vpc
            });
            var myDatabaseCluster = new DatabaseCluster(this, "DatabaseCluster", new DatabaseClusterProps {
                Engine = DatabaseClusterEngine.AuroraMysql(new AuroraMysqlClusterEngineProps { Version = AuroraMysqlEngineVersion.VER_2_08_1 }),
                Credentials = Credentials.FromGeneratedSecret("clusteradmin"),
                InstanceProps = new InstanceProps {
                    Vpc = vpc
                }
            });
            var myServerlessCluster = new ServerlessCluster(this, "ServerlessCluster", new ServerlessClusterProps {
                Engine = DatabaseClusterEngine.AURORA_POSTGRESQL,
                ParameterGroup = ParameterGroup.FromParameterGroupName(this, "ParameterGroup", "default.aurora-postgresql11"),
                Vpc = vpc
            });
            var myCoolConstruct = new Construct(this, "MyCoolConstruct");

            plan.AddSelection("Selection", new BackupSelectionOptions {
                Resources = new [] { BackupResource.FromDynamoDbTable(myTable), BackupResource.FromRdsDatabaseInstance(myDatabaseInstance), BackupResource.FromRdsDatabaseCluster(myDatabaseCluster), BackupResource.FromRdsServerlessCluster(myServerlessCluster), BackupResource.FromTag("stage", "prod"), BackupResource.FromConstruct(myCoolConstruct) }
            });

Synopsis

Properties

AllowRestores

Whether to automatically give restores permissions to the role that AWS Backup uses.

BackupSelectionName

The name for this selection.

DisableDefaultBackupPolicy

Whether to disable automatically assigning default backup permissions to the role that AWS Backup uses.

Resources

The resources to backup.

Role

The role that AWS Backup uses to authenticate when backuping or restoring the resources.

Properties

AllowRestores

Whether to automatically give restores permissions to the role that AWS Backup uses.

bool? AllowRestores { get; }
Property Value

bool?

Remarks

If true, the AWSBackupServiceRolePolicyForRestores managed policy will be attached to the role.

Default: false

BackupSelectionName

The name for this selection.

string? BackupSelectionName { get; }
Property Value

string

Remarks

Default: - a CDK generated name

DisableDefaultBackupPolicy

Whether to disable automatically assigning default backup permissions to the role that AWS Backup uses.

bool? DisableDefaultBackupPolicy { get; }
Property Value

bool?

Remarks

If false, the AWSBackupServiceRolePolicyForBackup managed policy will be attached to the role.

Default: false

Resources

The resources to backup.

BackupResource[] Resources { get; }
Property Value

BackupResource[]

Remarks

Use the helper static methods defined on BackupResource.

Role

The role that AWS Backup uses to authenticate when backuping or restoring the resources.

IRole? Role { get; }
Property Value

IRole

Remarks

The AWSBackupServiceRolePolicyForBackup managed policy will be attached to this role unless disableDefaultBackupPolicy is set to true.

Default: - a new role will be created

Back to top Generated by DocFX