Class: AWSCDK::RDS::CfnDBCluster::ServerlessV2ScalingConfigurationProperty

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

Overview

The ServerlessV2ScalingConfiguration property type specifies the scaling configuration of an Aurora Serverless V2 DB cluster.

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

If you have an Aurora cluster, you must set this attribute before you add a DB instance that uses the db.serverless DB instance class. For more information, see Clusters that use Aurora Serverless v2 must have a capacity range specified in the Amazon Aurora User Guide .

This property is only supported for Aurora Serverless v2. For Aurora Serverless v1, use the ScalingConfiguration property.

Valid for: Aurora Serverless v2 DB clusters

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_capacity: nil, min_capacity: nil, seconds_until_auto_pause: nil) ⇒ ServerlessV2ScalingConfigurationProperty

Returns a new instance of ServerlessV2ScalingConfigurationProperty.

Parameters:

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

    The maximum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.

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

    The minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.

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

    Specifies the number of seconds an Aurora Serverless v2 DB instance must be idle before Aurora attempts to automatically pause it.



1727
1728
1729
1730
1731
1732
1733
1734
# File 'rds/cfn_db_cluster.rb', line 1727

def initialize(max_capacity: nil, min_capacity: nil, seconds_until_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_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?
end

Instance Attribute Details

#max_capacityNumeric? (readonly)

The maximum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.

You can specify ACU values in half-step increments, such as 40, 40.5, 41, and so on. The largest value that you can use is 128.

The maximum capacity must be higher than 0.5 ACUs. For more information, see Choosing the maximum Aurora Serverless v2 capacity setting for a cluster in the Amazon Aurora User Guide .

Aurora automatically sets certain parameters for Aurora Serverless V2 DB instances to values that depend on the maximum ACU value in the capacity range. When you update the maximum capacity value, the ParameterApplyStatus value for the DB instance changes to pending-reboot . You can update the parameter values by rebooting the DB instance after changing the capacity range.



1746
1747
1748
# File 'rds/cfn_db_cluster.rb', line 1746

def max_capacity
  @max_capacity
end

#min_capacityNumeric? (readonly)

The minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster.

You can specify ACU values in half-step increments, such as 8, 8.5, 9, and so on. For Aurora versions that support the Aurora Serverless v2 auto-pause feature, the smallest value that you can use is 0. For versions that don't support Aurora Serverless v2 auto-pause, the smallest value that you can use is 0.5.



1753
1754
1755
# File 'rds/cfn_db_cluster.rb', line 1753

def min_capacity
  @min_capacity
end

#seconds_until_auto_pauseNumeric? (readonly)

Specifies the number of seconds an Aurora Serverless v2 DB instance must be idle before Aurora attempts to automatically pause it.

Specify a value between 300 seconds (five minutes) and 86,400 seconds (one day). The default is 300 seconds.



1760
1761
1762
# File 'rds/cfn_db_cluster.rb', line 1760

def seconds_until_auto_pause
  @seconds_until_auto_pause
end

Class Method Details

.jsii_propertiesObject



1762
1763
1764
1765
1766
1767
1768
# File 'rds/cfn_db_cluster.rb', line 1762

def self.jsii_properties
  {
    :max_capacity => "maxCapacity",
    :min_capacity => "minCapacity",
    :seconds_until_auto_pause => "secondsUntilAutoPause",
  }
end

Instance Method Details

#to_jsiiObject



1770
1771
1772
1773
1774
1775
1776
1777
1778
# File 'rds/cfn_db_cluster.rb', line 1770

def to_jsii
  result = {}
  result.merge!({
    "maxCapacity" => @max_capacity,
    "minCapacity" => @min_capacity,
    "secondsUntilAutoPause" => @seconds_until_auto_pause,
  })
  result.compact
end