Class: AWSCDK::RDS::ServerlessScalingOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::RDS::ServerlessScalingOptions
- Defined in:
- rds/serverless_scaling_options.rb
Overview
Options for configuring scaling on an Aurora Serverless v1 Cluster.
Instance Attribute Summary collapse
-
#auto_pause ⇒ AWSCDK::Duration?
readonly
The time before an Aurora Serverless database cluster is paused.
-
#max_capacity ⇒ AWSCDK::RDS::AuroraCapacityUnit?
readonly
The maximum capacity for an Aurora Serverless database cluster.
-
#min_capacity ⇒ AWSCDK::RDS::AuroraCapacityUnit?
readonly
The minimum capacity for an Aurora Serverless database cluster.
-
#timeout ⇒ AWSCDK::Duration?
readonly
The amount of time that Aurora Serverless v1 tries to find a scaling point to perform seamless scaling before enforcing the timeout action.
-
#timeout_action ⇒ AWSCDK::RDS::TimeoutAction?
readonly
The action to take when the timeout is reached.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auto_pause: nil, max_capacity: nil, min_capacity: nil, timeout: nil, timeout_action: nil) ⇒ ServerlessScalingOptions
constructor
A new instance of ServerlessScalingOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auto_pause: nil, max_capacity: nil, min_capacity: nil, timeout: nil, timeout_action: nil) ⇒ ServerlessScalingOptions
Returns a new instance of ServerlessScalingOptions.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'rds/serverless_scaling_options.rb', line 12 def initialize(auto_pause: nil, max_capacity: nil, min_capacity: nil, timeout: nil, timeout_action: nil) @auto_pause = auto_pause Jsii::Type.check_type(@auto_pause, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "autoPause") unless @auto_pause.nil? @max_capacity = max_capacity Jsii::Type.check_type(@max_capacity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLkF1cm9yYUNhcGFjaXR5VW5pdCJ9")), "maxCapacity") unless @max_capacity.nil? @min_capacity = min_capacity Jsii::Type.check_type(@min_capacity, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLkF1cm9yYUNhcGFjaXR5VW5pdCJ9")), "minCapacity") unless @min_capacity.nil? @timeout = timeout Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil? @timeout_action = timeout_action Jsii::Type.check_type(@timeout_action, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcmRzLlRpbWVvdXRBY3Rpb24ifQ==")), "timeoutAction") unless @timeout_action.nil? end |
Instance Attribute Details
#auto_pause ⇒ AWSCDK::Duration? (readonly)
Default: - automatic pause enabled after 5 minutes
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
38 39 40 |
# File 'rds/serverless_scaling_options.rb', line 38 def auto_pause @auto_pause end |
#max_capacity ⇒ AWSCDK::RDS::AuroraCapacityUnit? (readonly)
Default: - determined by Aurora based on database engine
The maximum capacity for an Aurora Serverless database cluster.
43 44 45 |
# File 'rds/serverless_scaling_options.rb', line 43 def max_capacity @max_capacity end |
#min_capacity ⇒ AWSCDK::RDS::AuroraCapacityUnit? (readonly)
Default: - determined by Aurora based on database engine
The minimum capacity for an Aurora Serverless database cluster.
48 49 50 |
# File 'rds/serverless_scaling_options.rb', line 48 def min_capacity @min_capacity end |
#timeout ⇒ AWSCDK::Duration? (readonly)
Default: - 5 minutes
The amount of time that Aurora Serverless v1 tries to find a scaling point to perform seamless scaling before enforcing the timeout action.
53 54 55 |
# File 'rds/serverless_scaling_options.rb', line 53 def timeout @timeout end |
#timeout_action ⇒ AWSCDK::RDS::TimeoutAction? (readonly)
Default: - TimeoutAction.ROLLBACK_CAPACITY_CHANGE
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.
61 62 63 |
# File 'rds/serverless_scaling_options.rb', line 61 def timeout_action @timeout_action end |
Class Method Details
.jsii_properties ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'rds/serverless_scaling_options.rb', line 63 def self.jsii_properties { :auto_pause => "autoPause", :max_capacity => "maxCapacity", :min_capacity => "minCapacity", :timeout => "timeout", :timeout_action => "timeoutAction", } end |
Instance Method Details
#to_jsii ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 |
# File 'rds/serverless_scaling_options.rb', line 73 def to_jsii result = {} result.merge!({ "autoPause" => @auto_pause, "maxCapacity" => @max_capacity, "minCapacity" => @min_capacity, "timeout" => @timeout, "timeoutAction" => @timeout_action, }) result.compact end |