aws-cdk-lib.aws_rds.ServerlessClusterFromSnapshotProps

interface ServerlessClusterFromSnapshotProps

LanguageType name
.NETAmazon.CDK.AWS.RDS.ServerlessClusterFromSnapshotProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsrds#ServerlessClusterFromSnapshotProps
Javasoftware.amazon.awscdk.services.rds.ServerlessClusterFromSnapshotProps
Pythonaws_cdk.aws_rds.ServerlessClusterFromSnapshotProps
TypeScript (source)aws-cdk-lib » aws_rds » ServerlessClusterFromSnapshotProps

Properties for ServerlessClusterFromSnapshot.

Example

declare const vpc: ec2.Vpc;
new rds.ServerlessClusterFromSnapshot(this, 'Cluster', {
  engine: rds.DatabaseClusterEngine.AURORA_MYSQL,
  vpc,
  snapshotIdentifier: 'mySnapshot',
});

Properties

NameTypeDescription
engineIClusterEngineWhat kind of database to start.
snapshotIdentifierstringThe identifier for the DB instance snapshot or DB cluster snapshot to restore from.
backupRetention?DurationThe number of days during which automatic DB snapshots are retained.
clusterIdentifier?stringAn optional identifier for the cluster.
copyTagsToSnapshot?booleanWhether to copy tags to the snapshot when a snapshot is created.
credentials?SnapshotCredentialsMaster user credentials.
defaultDatabaseName?stringName of a database which is automatically created inside the cluster.
deletionProtection?booleanIndicates whether the DB cluster should have deletion protection enabled.
enableDataApi?booleanWhether to enable the Data API.
parameterGroup?IParameterGroupAdditional parameters to pass to the database engine.
removalPolicy?RemovalPolicyThe removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.
scaling?ServerlessScalingOptionsScaling configuration of an Aurora Serverless database cluster.
securityGroups?ISecurityGroup[]Security group.
subnetGroup?ISubnetGroupExisting subnet group for the cluster.
vpc?IVpcThe VPC that this Aurora Serverless cluster has been created in.
vpcSubnets?SubnetSelectionWhere to place the instances within the VPC.

engine

Type: IClusterEngine

What kind of database to start.


snapshotIdentifier

Type: string

The identifier for the DB instance snapshot or DB cluster snapshot to restore from.

You can use either the name or the Amazon Resource Name (ARN) to specify a DB cluster snapshot. However, you can use only the ARN to specify a DB instance snapshot.


backupRetention?

Type: Duration (optional, default: Duration.days(1))

The number of days during which automatic DB snapshots are retained.

Automatic backup retention cannot be disabled on serverless clusters. Must be a value from 1 day to 35 days.


clusterIdentifier?

Type: string (optional, default: A name is automatically generated.)

An optional identifier for the cluster.


copyTagsToSnapshot?

Type: boolean (optional, default: true)

Whether to copy tags to the snapshot when a snapshot is created.


credentials?

Type: SnapshotCredentials (optional, default: The existing username and password from the snapshot will be used.)

Master user credentials.

Note - It is not possible to change the master username for a snapshot; however, it is possible to provide (or generate) a new password.


defaultDatabaseName?

Type: string (optional, default: Database is not created in cluster.)

Name of a database which is automatically created inside the cluster.


deletionProtection?

Type: boolean (optional, default: true if removalPolicy is RETAIN, false otherwise)

Indicates whether the DB cluster should have deletion protection enabled.


enableDataApi?

Type: boolean (optional, default: false)

Whether to enable the Data API.

See also: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html


parameterGroup?

Type: IParameterGroup (optional, default: no parameter group.)

Additional parameters to pass to the database engine.


removalPolicy?

Type: RemovalPolicy (optional, default: RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data))

The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.


scaling?

Type: ServerlessScalingOptions (optional, default: Serverless cluster is automatically paused after 5 minutes of being idle. minimum capacity: 2 ACU maximum capacity: 16 ACU)

Scaling configuration of an Aurora Serverless database cluster.


securityGroups?

Type: ISecurityGroup[] (optional, default: a new security group is created if vpc was provided. If the vpc property was not provided, no VPC security groups will be associated with the DB cluster.)

Security group.


subnetGroup?

Type: ISubnetGroup (optional, default: a new subnet group is created if vpc was provided. If the vpc property was not provided, no subnet group will be associated with the DB cluster)

Existing subnet group for the cluster.


vpc?

Type: IVpc (optional, default: the default VPC in the account and region will be used)

The VPC that this Aurora Serverless cluster has been created in.


vpcSubnets?

Type: SubnetSelection (optional, default: the VPC default strategy if not specified.)

Where to place the instances within the VPC.

If provided, the vpc property must also be specified.