Class ServerlessClusterFromSnapshotProps.Builder
java.lang.Object
software.amazon.awscdk.services.rds.ServerlessClusterFromSnapshotProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServerlessClusterFromSnapshotProps>
- Enclosing interface:
ServerlessClusterFromSnapshotProps
@Stability(Stable)
public static final class ServerlessClusterFromSnapshotProps.Builder
extends Object
implements software.amazon.jsii.Builder<ServerlessClusterFromSnapshotProps>
A builder for
ServerlessClusterFromSnapshotProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbackupRetention
(Duration backupRetention) Sets the value ofServerlessClusterFromSnapshotProps.getBackupRetention()
build()
Builds the configured instance.clusterIdentifier
(String clusterIdentifier) Sets the value ofServerlessClusterFromSnapshotProps.getClusterIdentifier()
copyTagsToSnapshot
(Boolean copyTagsToSnapshot) Sets the value ofServerlessClusterFromSnapshotProps.getCopyTagsToSnapshot()
credentials
(SnapshotCredentials credentials) Sets the value ofServerlessClusterFromSnapshotProps.getCredentials()
defaultDatabaseName
(String defaultDatabaseName) Sets the value ofServerlessClusterFromSnapshotProps.getDefaultDatabaseName()
deletionProtection
(Boolean deletionProtection) Sets the value ofServerlessClusterFromSnapshotProps.getDeletionProtection()
enableDataApi
(Boolean enableDataApi) Sets the value ofServerlessClusterFromSnapshotProps.getEnableDataApi()
engine
(IClusterEngine engine) Sets the value ofServerlessClusterFromSnapshotProps.getEngine()
parameterGroup
(IParameterGroup parameterGroup) Sets the value ofServerlessClusterFromSnapshotProps.getParameterGroup()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofServerlessClusterFromSnapshotProps.getRemovalPolicy()
scaling
(ServerlessScalingOptions scaling) Sets the value ofServerlessClusterFromSnapshotProps.getScaling()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofServerlessClusterFromSnapshotProps.getSecurityGroups()
snapshotIdentifier
(String snapshotIdentifier) Sets the value ofServerlessClusterFromSnapshotProps.getSnapshotIdentifier()
subnetGroup
(ISubnetGroup subnetGroup) Sets the value ofServerlessClusterFromSnapshotProps.getSubnetGroup()
Sets the value ofServerlessClusterFromSnapshotProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofServerlessClusterFromSnapshotProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
engine
Sets the value ofServerlessClusterFromSnapshotProps.getEngine()
- Parameters:
engine
- What kind of database to start. This parameter is required.- Returns:
this
-
snapshotIdentifier
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder snapshotIdentifier(String snapshotIdentifier) Sets the value ofServerlessClusterFromSnapshotProps.getSnapshotIdentifier()
- Parameters:
snapshotIdentifier
- The identifier for the DB instance snapshot or DB cluster snapshot to restore from. This parameter is required. 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.- Returns:
this
-
backupRetention
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder backupRetention(Duration backupRetention) Sets the value ofServerlessClusterFromSnapshotProps.getBackupRetention()
- Parameters:
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.- Returns:
this
-
clusterIdentifier
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder clusterIdentifier(String clusterIdentifier) Sets the value ofServerlessClusterFromSnapshotProps.getClusterIdentifier()
- Parameters:
clusterIdentifier
- An optional identifier for the cluster.- Returns:
this
-
copyTagsToSnapshot
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder copyTagsToSnapshot(Boolean copyTagsToSnapshot) Sets the value ofServerlessClusterFromSnapshotProps.getCopyTagsToSnapshot()
- Parameters:
copyTagsToSnapshot
- Whether to copy tags to the snapshot when a snapshot is created.- Returns:
this
-
credentials
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder credentials(SnapshotCredentials credentials) Sets the value ofServerlessClusterFromSnapshotProps.getCredentials()
- Parameters:
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.- Returns:
this
-
defaultDatabaseName
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder defaultDatabaseName(String defaultDatabaseName) Sets the value ofServerlessClusterFromSnapshotProps.getDefaultDatabaseName()
- Parameters:
defaultDatabaseName
- Name of a database which is automatically created inside the cluster.- Returns:
this
-
deletionProtection
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder deletionProtection(Boolean deletionProtection) Sets the value ofServerlessClusterFromSnapshotProps.getDeletionProtection()
- Parameters:
deletionProtection
- Indicates whether the DB cluster should have deletion protection enabled.- Returns:
this
-
enableDataApi
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder enableDataApi(Boolean enableDataApi) Sets the value ofServerlessClusterFromSnapshotProps.getEnableDataApi()
- Parameters:
enableDataApi
- Whether to enable the Data API.- Returns:
this
-
parameterGroup
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder parameterGroup(IParameterGroup parameterGroup) Sets the value ofServerlessClusterFromSnapshotProps.getParameterGroup()
- Parameters:
parameterGroup
- Additional parameters to pass to the database engine.- Returns:
this
-
removalPolicy
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder removalPolicy(RemovalPolicy removalPolicy) Sets the value ofServerlessClusterFromSnapshotProps.getRemovalPolicy()
- Parameters:
removalPolicy
- The removal policy to apply when the cluster and its instances are removed from the stack or replaced during an update.- Returns:
this
-
scaling
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder scaling(ServerlessScalingOptions scaling) Sets the value ofServerlessClusterFromSnapshotProps.getScaling()
- Parameters:
scaling
- Scaling configuration of an Aurora Serverless database cluster.- Returns:
this
-
securityGroups
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofServerlessClusterFromSnapshotProps.getSecurityGroups()
- Parameters:
securityGroups
- Security group.- Returns:
this
-
subnetGroup
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder subnetGroup(ISubnetGroup subnetGroup) Sets the value ofServerlessClusterFromSnapshotProps.getSubnetGroup()
- Parameters:
subnetGroup
- Existing subnet group for the cluster.- Returns:
this
-
vpc
Sets the value ofServerlessClusterFromSnapshotProps.getVpc()
- Parameters:
vpc
- The VPC that this Aurora Serverless v1 Cluster has been created in.- Returns:
this
-
vpcSubnets
@Stability(Stable) public ServerlessClusterFromSnapshotProps.Builder vpcSubnets(SubnetSelection vpcSubnets) Sets the value ofServerlessClusterFromSnapshotProps.getVpcSubnets()
- Parameters:
vpcSubnets
- Where to place the instances within the VPC. If provided, thevpc
property must also be specified.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServerlessClusterFromSnapshotProps>
- Returns:
- a new instance of
ServerlessClusterFromSnapshotProps
- Throws:
NullPointerException
- if any required attribute was not provided
-