Class ServerlessClusterProps.Builder
java.lang.Object
software.amazon.awscdk.services.rds.ServerlessClusterProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServerlessClusterProps>
- Enclosing interface:
ServerlessClusterProps
@Stability(Stable)
public static final class ServerlessClusterProps.Builder
extends Object
implements software.amazon.jsii.Builder<ServerlessClusterProps>
A builder for
ServerlessClusterProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbackupRetention
(Duration backupRetention) Sets the value ofServerlessClusterProps.getBackupRetention()
build()
Builds the configured instance.clusterIdentifier
(String clusterIdentifier) Sets the value ofServerlessClusterProps.getClusterIdentifier()
copyTagsToSnapshot
(Boolean copyTagsToSnapshot) Sets the value ofServerlessClusterProps.getCopyTagsToSnapshot()
credentials
(Credentials credentials) Sets the value ofServerlessClusterProps.getCredentials()
defaultDatabaseName
(String defaultDatabaseName) Sets the value ofServerlessClusterProps.getDefaultDatabaseName()
deletionProtection
(Boolean deletionProtection) Sets the value ofServerlessClusterProps.getDeletionProtection()
enableDataApi
(Boolean enableDataApi) Sets the value ofServerlessClusterProps.getEnableDataApi()
engine
(IClusterEngine engine) Sets the value ofServerlessClusterProps.getEngine()
parameterGroup
(IParameterGroup parameterGroup) Sets the value ofServerlessClusterProps.getParameterGroup()
removalPolicy
(RemovalPolicy removalPolicy) Sets the value ofServerlessClusterProps.getRemovalPolicy()
scaling
(ServerlessScalingOptions scaling) Sets the value ofServerlessClusterProps.getScaling()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofServerlessClusterProps.getSecurityGroups()
storageEncryptionKey
(IKey storageEncryptionKey) Sets the value ofServerlessClusterProps.getStorageEncryptionKey()
subnetGroup
(ISubnetGroup subnetGroup) Sets the value ofServerlessClusterProps.getSubnetGroup()
Sets the value ofServerlessClusterProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofServerlessClusterProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
engine
Sets the value ofServerlessClusterProps.getEngine()
- Parameters:
engine
- What kind of database to start. This parameter is required.- Returns:
this
-
backupRetention
Sets the value ofServerlessClusterProps.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 ServerlessClusterProps.Builder clusterIdentifier(String clusterIdentifier) Sets the value ofServerlessClusterProps.getClusterIdentifier()
- Parameters:
clusterIdentifier
- An optional identifier for the cluster.- Returns:
this
-
copyTagsToSnapshot
@Stability(Stable) public ServerlessClusterProps.Builder copyTagsToSnapshot(Boolean copyTagsToSnapshot) Sets the value ofServerlessClusterProps.getCopyTagsToSnapshot()
- Parameters:
copyTagsToSnapshot
- Whether to copy tags to the snapshot when a snapshot is created.- Returns:
this
-
credentials
Sets the value ofServerlessClusterProps.getCredentials()
- Parameters:
credentials
- Credentials for the administrative user.- Returns:
this
-
defaultDatabaseName
@Stability(Stable) public ServerlessClusterProps.Builder defaultDatabaseName(String defaultDatabaseName) Sets the value ofServerlessClusterProps.getDefaultDatabaseName()
- Parameters:
defaultDatabaseName
- Name of a database which is automatically created inside the cluster.- Returns:
this
-
deletionProtection
@Stability(Stable) public ServerlessClusterProps.Builder deletionProtection(Boolean deletionProtection) Sets the value ofServerlessClusterProps.getDeletionProtection()
- Parameters:
deletionProtection
- Indicates whether the DB cluster should have deletion protection enabled.- Returns:
this
-
enableDataApi
Sets the value ofServerlessClusterProps.getEnableDataApi()
- Parameters:
enableDataApi
- Whether to enable the Data API.- Returns:
this
-
parameterGroup
@Stability(Stable) public ServerlessClusterProps.Builder parameterGroup(IParameterGroup parameterGroup) Sets the value ofServerlessClusterProps.getParameterGroup()
- Parameters:
parameterGroup
- Additional parameters to pass to the database engine.- Returns:
this
-
removalPolicy
Sets the value ofServerlessClusterProps.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
Sets the value ofServerlessClusterProps.getScaling()
- Parameters:
scaling
- Scaling configuration of an Aurora Serverless database cluster.- Returns:
this
-
securityGroups
@Stability(Stable) public ServerlessClusterProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofServerlessClusterProps.getSecurityGroups()
- Parameters:
securityGroups
- Security group.- Returns:
this
-
storageEncryptionKey
@Stability(Stable) public ServerlessClusterProps.Builder storageEncryptionKey(IKey storageEncryptionKey) Sets the value ofServerlessClusterProps.getStorageEncryptionKey()
- Parameters:
storageEncryptionKey
- The KMS key for storage encryption.- Returns:
this
-
subnetGroup
Sets the value ofServerlessClusterProps.getSubnetGroup()
- Parameters:
subnetGroup
- Existing subnet group for the cluster.- Returns:
this
-
vpc
Sets the value ofServerlessClusterProps.getVpc()
- Parameters:
vpc
- The VPC that this Aurora Serverless v1 Cluster has been created in.- Returns:
this
-
vpcSubnets
Sets the value ofServerlessClusterProps.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<ServerlessClusterProps>
- Returns:
- a new instance of
ServerlessClusterProps
- Throws:
NullPointerException
- if any required attribute was not provided
-