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()
Sets the value ofServerlessScalingOptions.getTimeout()
timeoutAction
(TimeoutAction timeoutAction) Sets the value ofServerlessScalingOptions.getTimeoutAction()
-
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
-
timeout
Sets the value ofServerlessScalingOptions.getTimeout()
- Parameters:
timeout
- The amount of time that Aurora Serverless v1 tries to find a scaling point to perform seamless scaling before enforcing the timeout action.- Returns:
this
-
timeoutAction
@Stability(Stable) public ServerlessScalingOptions.Builder timeoutAction(TimeoutAction timeoutAction) Sets the value ofServerlessScalingOptions.getTimeoutAction()
- Parameters:
timeoutAction
- The action to take when the timeout is reached. Selecting ForceApplyCapacityChange will force the capacity to the specified value as soon as possible, even without a scaling point. Selecting RollbackCapacityChange will ignore the capacity change if a scaling point is not found. This is the default behavior.- 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
-