Class ServerlessClusterFromSnapshot.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServerlessClusterFromSnapshot>
- Enclosing class:
ServerlessClusterFromSnapshot
ServerlessClusterFromSnapshot
.-
Method Summary
Modifier and TypeMethodDescriptionbackupRetention
(Duration backupRetention) The number of days during which automatic DB snapshots are retained.build()
clusterIdentifier
(String clusterIdentifier) An optional identifier for the cluster.copyTagsToSnapshot
(Boolean copyTagsToSnapshot) Whether to copy tags to the snapshot when a snapshot is created.credentials
(SnapshotCredentials credentials) Master user credentials.defaultDatabaseName
(String defaultDatabaseName) Name of a database which is automatically created inside the cluster.deletionProtection
(Boolean deletionProtection) Indicates whether the DB cluster should have deletion protection enabled.enableDataApi
(Boolean enableDataApi) Whether to enable the Data API.engine
(IClusterEngine engine) What kind of database to start.parameterGroup
(IParameterGroup parameterGroup) Additional parameters to pass to the database engine.removalPolicy
(RemovalPolicy removalPolicy) The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.scaling
(ServerlessScalingOptions scaling) Scaling configuration of an Aurora Serverless database cluster.securityGroups
(List<? extends ISecurityGroup> securityGroups) Security group.snapshotIdentifier
(String snapshotIdentifier) The identifier for the DB instance snapshot or DB cluster snapshot to restore from.subnetGroup
(ISubnetGroup subnetGroup) Existing subnet group for the cluster.The VPC that this Aurora Serverless v1 Cluster has been created in.vpcSubnets
(SubnetSelection vpcSubnets) Where to place the instances within the VPC.
-
Method Details
-
create
@Stability(Stable) public static ServerlessClusterFromSnapshot.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ServerlessClusterFromSnapshot.Builder
.
-
engine
What kind of database to start.- Parameters:
engine
- What kind of database to start. This parameter is required.- Returns:
this
-
snapshotIdentifier
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder snapshotIdentifier(String snapshotIdentifier) 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.
- Parameters:
snapshotIdentifier
- The identifier for the DB instance snapshot or DB cluster snapshot to restore from. This parameter is required.- Returns:
this
-
backupRetention
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder backupRetention(Duration backupRetention) 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.
Default: Duration.days(1)
- Parameters:
backupRetention
- The number of days during which automatic DB snapshots are retained. This parameter is required.- Returns:
this
-
clusterIdentifier
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder clusterIdentifier(String clusterIdentifier) An optional identifier for the cluster.Default: - A name is automatically generated.
- Parameters:
clusterIdentifier
- An optional identifier for the cluster. This parameter is required.- Returns:
this
-
copyTagsToSnapshot
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder copyTagsToSnapshot(Boolean copyTagsToSnapshot) Whether to copy tags to the snapshot when a snapshot is created.Default: - true
- Parameters:
copyTagsToSnapshot
- Whether to copy tags to the snapshot when a snapshot is created. This parameter is required.- Returns:
this
-
credentials
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder credentials(SnapshotCredentials credentials) 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.
Default: - The existing username and password from the snapshot will be used.
- Parameters:
credentials
- Master user credentials. This parameter is required.- Returns:
this
-
defaultDatabaseName
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder defaultDatabaseName(String defaultDatabaseName) Name of a database which is automatically created inside the cluster.Default: - Database is not created in cluster.
- Parameters:
defaultDatabaseName
- Name of a database which is automatically created inside the cluster. This parameter is required.- Returns:
this
-
deletionProtection
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder deletionProtection(Boolean deletionProtection) Indicates whether the DB cluster should have deletion protection enabled.Default: - true if removalPolicy is RETAIN, false otherwise
- Parameters:
deletionProtection
- Indicates whether the DB cluster should have deletion protection enabled. This parameter is required.- Returns:
this
-
enableDataApi
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder enableDataApi(Boolean enableDataApi) Whether to enable the Data API.Default: false
- Parameters:
enableDataApi
- Whether to enable the Data API. This parameter is required.- Returns:
this
- See Also:
-
parameterGroup
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder parameterGroup(IParameterGroup parameterGroup) Additional parameters to pass to the database engine.Default: - no parameter group.
- Parameters:
parameterGroup
- Additional parameters to pass to the database engine. This parameter is required.- Returns:
this
-
removalPolicy
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder removalPolicy(RemovalPolicy removalPolicy) The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.Default: - RemovalPolicy.SNAPSHOT (remove the cluster and instances, but retain a snapshot of the data)
- Parameters:
removalPolicy
- The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update. This parameter is required.- Returns:
this
-
scaling
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder scaling(ServerlessScalingOptions scaling) Scaling configuration of an Aurora Serverless database cluster.Default: - Serverless cluster is automatically paused after 5 minutes of being idle. minimum capacity: 2 ACU maximum capacity: 16 ACU
- Parameters:
scaling
- Scaling configuration of an Aurora Serverless database cluster. This parameter is required.- Returns:
this
-
securityGroups
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Security group.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.
- Parameters:
securityGroups
- Security group. This parameter is required.- Returns:
this
-
subnetGroup
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder subnetGroup(ISubnetGroup subnetGroup) Existing subnet group for the cluster.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
- Parameters:
subnetGroup
- Existing subnet group for the cluster. This parameter is required.- Returns:
this
-
vpc
The VPC that this Aurora Serverless v1 Cluster has been created in.Default: - the default VPC in the account and region will be used
- Parameters:
vpc
- The VPC that this Aurora Serverless v1 Cluster has been created in. This parameter is required.- Returns:
this
-
vpcSubnets
@Stability(Stable) public ServerlessClusterFromSnapshot.Builder vpcSubnets(SubnetSelection vpcSubnets) Where to place the instances within the VPC.If provided, the
vpc
property must also be specified.Default: - the VPC default strategy if not specified.
- Parameters:
vpcSubnets
- Where to place the instances within the VPC. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServerlessClusterFromSnapshot>
- Returns:
- a newly built instance of
ServerlessClusterFromSnapshot
.
-