Class ServerlessScalingOptions.Builder
java.lang.Object
software.amazon.awscdk.services.rds.ServerlessScalingOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ServerlessScalingOptions>
- Enclosing interface:
- ServerlessScalingOptions
@Stability(Stable)
public static final class ServerlessScalingOptions.Builder
extends Object
implements software.amazon.jsii.Builder<ServerlessScalingOptions>
A builder for
ServerlessScalingOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofServerlessScalingOptions.getAutoPause()
build()
Builds the configured instance.maxCapacity
(AuroraCapacityUnit maxCapacity) Sets the value ofServerlessScalingOptions.getMaxCapacity()
minCapacity
(AuroraCapacityUnit minCapacity) Sets the value ofServerlessScalingOptions.getMinCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
autoPause
Sets the value ofServerlessScalingOptions.getAutoPause()
- Parameters:
autoPause
- The time before an Aurora Serverless database cluster is paused. 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
- Returns:
this
-
maxCapacity
@Stability(Stable) public ServerlessScalingOptions.Builder maxCapacity(AuroraCapacityUnit maxCapacity) Sets the value ofServerlessScalingOptions.getMaxCapacity()
- Parameters:
maxCapacity
- The maximum capacity for an Aurora Serverless database cluster.- Returns:
this
-
minCapacity
@Stability(Stable) public ServerlessScalingOptions.Builder minCapacity(AuroraCapacityUnit minCapacity) Sets the value ofServerlessScalingOptions.getMinCapacity()
- Parameters:
minCapacity
- The minimum capacity for an Aurora Serverless database cluster.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ServerlessScalingOptions>
- Returns:
- a new instance of
ServerlessScalingOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-