Class: AWSCDK::RDS::CfnDBCluster::ScalingConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rds/cfn_db_cluster.rb

Overview

The ScalingConfiguration property type specifies the scaling configuration of an Aurora Serverless v1 DB cluster.

For more information, see Using Amazon Aurora Serverless in the Amazon Aurora User Guide .

This property is only supported for Aurora Serverless v1. For Aurora Serverless v2, Use the ServerlessV2ScalingConfiguration property.

Valid for: Aurora Serverless v1 DB clusters only

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auto_pause: nil, max_capacity: nil, min_capacity: nil, seconds_before_timeout: nil, seconds_until_auto_pause: nil, timeout_action: nil) ⇒ ScalingConfigurationProperty

Returns a new instance of ScalingConfigurationProperty.

Parameters:

  • auto_pause (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether to allow or disallow automatic pause for an Aurora DB cluster in serverless DB engine mode.

  • max_capacity (Numeric, nil) (defaults to: nil)

    The maximum capacity for an Aurora DB cluster in serverless DB engine mode.

  • min_capacity (Numeric, nil) (defaults to: nil)

    The minimum capacity for an Aurora DB cluster in serverless DB engine mode.

  • seconds_before_timeout (Numeric, nil) (defaults to: nil)

    The amount of time, in seconds, that Aurora Serverless v1 tries to find a scaling point to perform seamless scaling before enforcing the timeout action.

  • seconds_until_auto_pause (Numeric, nil) (defaults to: nil)

    The time, in seconds, before an Aurora DB cluster in serverless mode is paused.

  • timeout_action (String, nil) (defaults to: nil)

    The action to take when the timeout is reached, either ForceApplyCapacityChange or RollbackCapacityChange .



1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
# File 'rds/cfn_db_cluster.rb', line 1609

def initialize(auto_pause: nil, max_capacity: nil, min_capacity: nil, seconds_before_timeout: nil, seconds_until_auto_pause: nil, timeout_action: nil)
  @auto_pause = auto_pause
  Jsii::Type.check_type(@auto_pause, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoPause") unless @auto_pause.nil?
  @max_capacity = max_capacity
  Jsii::Type.check_type(@max_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxCapacity") unless @max_capacity.nil?
  @min_capacity = min_capacity
  Jsii::Type.check_type(@min_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minCapacity") unless @min_capacity.nil?
  @seconds_before_timeout = seconds_before_timeout
  Jsii::Type.check_type(@seconds_before_timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "secondsBeforeTimeout") unless @seconds_before_timeout.nil?
  @seconds_until_auto_pause = seconds_until_auto_pause
  Jsii::Type.check_type(@seconds_until_auto_pause, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "secondsUntilAutoPause") unless @seconds_until_auto_pause.nil?
  @timeout_action = timeout_action
  Jsii::Type.check_type(@timeout_action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timeoutAction") unless @timeout_action.nil?
end

Instance Attribute Details

#auto_pauseBoolean, ... (readonly)

Indicates whether to allow or disallow automatic pause for an Aurora DB cluster in serverless DB engine mode.

A DB cluster can be paused only when it's idle (it has no connections).

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.



1632
1633
1634
# File 'rds/cfn_db_cluster.rb', line 1632

def auto_pause
  @auto_pause
end

#max_capacityNumeric? (readonly)

The maximum capacity for an Aurora DB cluster in serverless DB engine mode.

For Aurora MySQL, valid capacity values are 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , and 256 .

For Aurora PostgreSQL, valid capacity values are 2 , 4 , 8 , 16 , 32 , 64 , 192 , and 384 .

The maximum capacity must be greater than or equal to the minimum capacity.



1643
1644
1645
# File 'rds/cfn_db_cluster.rb', line 1643

def max_capacity
  @max_capacity
end

#min_capacityNumeric? (readonly)

The minimum capacity for an Aurora DB cluster in serverless DB engine mode.

For Aurora MySQL, valid capacity values are 1 , 2 , 4 , 8 , 16 , 32 , 64 , 128 , and 256 .

For Aurora PostgreSQL, valid capacity values are 2 , 4 , 8 , 16 , 32 , 64 , 192 , and 384 .

The minimum capacity must be less than or equal to the maximum capacity.



1654
1655
1656
# File 'rds/cfn_db_cluster.rb', line 1654

def min_capacity
  @min_capacity
end

#seconds_before_timeoutNumeric? (readonly)

The amount of time, in seconds, that Aurora Serverless v1 tries to find a scaling point to perform seamless scaling before enforcing the timeout action.

The default is 300.

Specify a value between 60 and 600 seconds.



1663
1664
1665
# File 'rds/cfn_db_cluster.rb', line 1663

def seconds_before_timeout
  @seconds_before_timeout
end

#seconds_until_auto_pauseNumeric? (readonly)

The time, in seconds, before an Aurora DB cluster in serverless mode is paused.

Specify a value between 300 and 86,400 seconds.



1670
1671
1672
# File 'rds/cfn_db_cluster.rb', line 1670

def seconds_until_auto_pause
  @seconds_until_auto_pause
end

#timeout_actionString? (readonly)

The action to take when the timeout is reached, either ForceApplyCapacityChange or RollbackCapacityChange .

ForceApplyCapacityChange sets the capacity to the specified value as soon as possible.

RollbackCapacityChange , the default, ignores the capacity change if a scaling point isn't found in the timeout period.

If you specify ForceApplyCapacityChange , connections that prevent Aurora Serverless v1 from finding a scaling point might be dropped.

For more information, see Autoscaling for Aurora Serverless v1 in the Amazon Aurora User Guide .



1683
1684
1685
# File 'rds/cfn_db_cluster.rb', line 1683

def timeout_action
  @timeout_action
end

Class Method Details

.jsii_propertiesObject



1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
# File 'rds/cfn_db_cluster.rb', line 1685

def self.jsii_properties
  {
    :auto_pause => "autoPause",
    :max_capacity => "maxCapacity",
    :min_capacity => "minCapacity",
    :seconds_before_timeout => "secondsBeforeTimeout",
    :seconds_until_auto_pause => "secondsUntilAutoPause",
    :timeout_action => "timeoutAction",
  }
end

Instance Method Details

#to_jsiiObject



1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
# File 'rds/cfn_db_cluster.rb', line 1696

def to_jsii
  result = {}
  result.merge!({
    "autoPause" => @auto_pause,
    "maxCapacity" => @max_capacity,
    "minCapacity" => @min_capacity,
    "secondsBeforeTimeout" => @seconds_before_timeout,
    "secondsUntilAutoPause" => @seconds_until_auto_pause,
    "timeoutAction" => @timeout_action,
  })
  result.compact
end