@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.507Z") @Stability(value=Stable) public interface ServerlessScalingOptions extends software.amazon.jsii.JsiiSerializable
Example:
Vpc vpc;
ServerlessCluster cluster = ServerlessCluster.Builder.create(this, "AnotherCluster")
.engine(DatabaseClusterEngine.AURORA_POSTGRESQL)
.copyTagsToSnapshot(true) // whether to save the cluster tags when creating the snapshot. Default is 'true'
.parameterGroup(ParameterGroup.fromParameterGroupName(this, "ParameterGroup", "default.aurora-postgresql10"))
.vpc(vpc)
.scaling(ServerlessScalingOptions.builder()
.autoPause(Duration.minutes(10)) // default is to pause after 5 minutes of idle time
.minCapacity(AuroraCapacityUnit.ACU_8) // default is 2 Aurora capacity units (ACUs)
.maxCapacity(AuroraCapacityUnit.ACU_32)
.build())
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
ServerlessScalingOptions.Builder
A builder for
ServerlessScalingOptions |
static class |
ServerlessScalingOptions.Jsii$Proxy
An implementation for
ServerlessScalingOptions |
| Modifier and Type | Method and Description |
|---|---|
static ServerlessScalingOptions.Builder |
builder() |
default Duration |
getAutoPause()
The time before an Aurora Serverless database cluster is paused.
|
default AuroraCapacityUnit |
getMaxCapacity()
The maximum capacity for an Aurora Serverless database cluster.
|
default AuroraCapacityUnit |
getMinCapacity()
The minimum capacity for an Aurora Serverless database cluster.
|
@Stability(value=Stable) @Nullable default Duration getAutoPause()
A database cluster can be paused only when it is idle (it has no connections). Auto pause time must be between 5 minutes and 1 day.
If a DB cluster is paused for more than seven days, the DB cluster might be backed up with a snapshot. In this case, the DB cluster is restored when there is a request to connect to it.
Set to 0 to disable
Default: - automatic pause enabled after 5 minutes
@Stability(value=Stable) @Nullable default AuroraCapacityUnit getMaxCapacity()
Default: - determined by Aurora based on database engine
@Stability(value=Stable) @Nullable default AuroraCapacityUnit getMinCapacity()
Default: - determined by Aurora based on database engine
@Stability(value=Stable) static ServerlessScalingOptions.Builder builder()
ServerlessScalingOptions.Builder of ServerlessScalingOptionsCopyright © 2022. All rights reserved.