Skip to content
v2.278.0

TimeoutAction Enum ​

TimeoutAction defines the action to take when a timeout occurs if a scaling point is not found.

Example ​

ts
declare const vpc: ec2.Vpc;

const cluster = new rds.ServerlessCluster(this, 'AnotherCluster', {
  engine: rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
  copyTagsToSnapshot: true, // whether to save the cluster tags when creating the snapshot. Default is 'true'
  parameterGroup: rds.ParameterGroup.fromParameterGroupName(this, 'ParameterGroup', 'default.aurora-postgresql11'),
  vpc,
  scaling: {
    autoPause: Duration.minutes(10), // default is to pause after 5 minutes of idle time
    minCapacity: rds.AuroraCapacityUnit.ACU_8, // default is 2 Aurora capacity units (ACUs)
    maxCapacity: rds.AuroraCapacityUnit.ACU_32, // default is 16 Aurora capacity units (ACUs)
    timeout: Duration.seconds(100), // default is 5 minutes
    timeoutAction: rds.TimeoutAction.FORCE_APPLY_CAPACITY_CHANGE // default is ROLLBACK_CAPACITY_CHANGE
  }
});
python
# vpc: ec2.Vpc


cluster = rds.ServerlessCluster(self, "AnotherCluster",
    engine=rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
    copy_tags_to_snapshot=True,  # whether to save the cluster tags when creating the snapshot. Default is 'true'
    parameter_group=rds.ParameterGroup.from_parameter_group_name(self, "ParameterGroup", "default.aurora-postgresql11"),
    vpc=vpc,
    scaling=rds.ServerlessScalingOptions(
        auto_pause=Duration.minutes(10),  # default is to pause after 5 minutes of idle time
        min_capacity=rds.AuroraCapacityUnit.ACU_8,  # default is 2 Aurora capacity units (ACUs)
        max_capacity=rds.AuroraCapacityUnit.ACU_32,  # default is 16 Aurora capacity units (ACUs)
        timeout=Duration.seconds(100),  # default is 5 minutes
        timeout_action=rds.TimeoutAction.FORCE_APPLY_CAPACITY_CHANGE
    )
)
java
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-postgresql11"))
        .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) // default is 16 Aurora capacity units (ACUs)
                .timeout(Duration.seconds(100)) // default is 5 minutes
                .timeoutAction(TimeoutAction.FORCE_APPLY_CAPACITY_CHANGE)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Vpc vpc;


var cluster = new ServerlessCluster(this, "AnotherCluster", new ServerlessClusterProps {
    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-postgresql11"),
    Vpc = vpc,
    Scaling = new ServerlessScalingOptions {
        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,  // default is 16 Aurora capacity units (ACUs)
        Timeout = Duration.Seconds(100),  // default is 5 minutes
        TimeoutAction = TimeoutAction.FORCE_APPLY_CAPACITY_CHANGE
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var vpc Vpc


cluster := rds.NewServerlessCluster(this, jsii.String("AnotherCluster"), &ServerlessClusterProps{
	Engine: rds.DatabaseClusterEngine_AURORA_POSTGRESQL(),
	CopyTagsToSnapshot: jsii.Boolean(true),
	 // whether to save the cluster tags when creating the snapshot. Default is 'true'
	ParameterGroup: rds.ParameterGroup_FromParameterGroupName(this, jsii.String("ParameterGroup"), jsii.String("default.aurora-postgresql11")),
	Vpc: Vpc,
	Scaling: &ServerlessScalingOptions{
		AutoPause: awscdk.Duration_Minutes(jsii.Number(10)),
		 // default is to pause after 5 minutes of idle time
		MinCapacity: rds.AuroraCapacityUnit_ACU_8,
		 // default is 2 Aurora capacity units (ACUs)
		MaxCapacity: rds.AuroraCapacityUnit_ACU_32,
		 // default is 16 Aurora capacity units (ACUs)
		Timeout: awscdk.Duration_Seconds(jsii.Number(100)),
		 // default is 5 minutes
		TimeoutAction: rds.TimeoutAction_FORCE_APPLY_CAPACITY_CHANGE,
	},
})

Members ​

MemberDescription
FORCE_APPLY_CAPACITY_CHANGEFORCE_APPLY_CAPACITY_CHANGE sets the capacity to the specified value as soon as possible.
ROLLBACK_CAPACITY_CHANGEROLLBACK_CAPACITY_CHANGE ignores the capacity change if a scaling point is not found.

Referenced by ​