Class ServerlessCluster.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServerlessCluster>
- Enclosing class:
ServerlessCluster
ServerlessCluster
.-
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.static ServerlessCluster.Builder
credentials
(Credentials credentials) Credentials for the administrative user.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.storageEncryptionKey
(IKey storageEncryptionKey) The KMS key for storage encryption.subnetGroup
(ISubnetGroup subnetGroup) Existing subnet group for the cluster.The VPC that this Aurora Serverless cluster has been created in.vpcSubnets
(SubnetSelection vpcSubnets) Where to place the instances within the VPC.
-
Method Details
-
create
@Stability(Stable) public static ServerlessCluster.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ServerlessCluster.Builder
.
-
engine
What kind of database to start.- Parameters:
engine
- What kind of database to start. This parameter is required.- Returns:
this
-
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
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
-
credentials
Credentials for the administrative user.Default: - A username of 'admin' and SecretsManager-generated password
- Parameters:
credentials
- Credentials for the administrative user. This parameter is required.- Returns:
this
-
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
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
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
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
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
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 ServerlessCluster.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
-
storageEncryptionKey
The KMS key for storage encryption.Default: - the default master key will be used for storage encryption
- Parameters:
storageEncryptionKey
- The KMS key for storage encryption. This parameter is required.- Returns:
this
-
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 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 cluster has been created in. This parameter is required.- Returns:
this
-
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<ServerlessCluster>
- Returns:
- a newly built instance of
ServerlessCluster
.
-