Class: AWSCDK::Cassandra::CfnTable::AutoScalingSettingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cassandra::CfnTable::AutoScalingSettingProperty
- Defined in:
- cassandra/cfn_table.rb
Overview
The optional auto scaling settings for a table with provisioned throughput capacity.
To turn on auto scaling for a table in throughputMode:PROVISIONED , you must specify the following parameters.
Configure the minimum and maximum capacity units. The auto scaling policy ensures that capacity never goes below the minimum or above the maximum range.
minimum_units: The minimum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).maximum_units: The maximum level of throughput the table should always be ready to support. The value must be between 1 and the max throughput per second quota for your account (40,000 by default).scaling_policy: Amazon Keyspaces supports thetarget trackingscaling policy. The auto scaling target is a percentage of the provisioned capacity of the table.
For more information, see Managing throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer Guide .
Instance Attribute Summary collapse
-
#auto_scaling_disabled ⇒ Boolean, ...
readonly
This optional parameter enables auto scaling for the table if set to
false. -
#maximum_units ⇒ Numeric?
readonly
Manage costs by specifying the maximum amount of throughput to provision.
-
#minimum_units ⇒ Numeric?
readonly
The minimum level of throughput the table should always be ready to support.
-
#scaling_policy ⇒ AWSCDK::IResolvable, ...
readonly
Amazon Keyspaces supports the
target trackingauto scaling policy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auto_scaling_disabled: nil, maximum_units: nil, minimum_units: nil, scaling_policy: nil) ⇒ AutoScalingSettingProperty
constructor
A new instance of AutoScalingSettingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auto_scaling_disabled: nil, maximum_units: nil, minimum_units: nil, scaling_policy: nil) ⇒ AutoScalingSettingProperty
Returns a new instance of AutoScalingSettingProperty.
704 705 706 707 708 709 710 711 712 713 |
# File 'cassandra/cfn_table.rb', line 704 def initialize(auto_scaling_disabled: nil, maximum_units: nil, minimum_units: nil, scaling_policy: nil) @auto_scaling_disabled = auto_scaling_disabled Jsii::Type.check_type(@auto_scaling_disabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoScalingDisabled") unless @auto_scaling_disabled.nil? @maximum_units = maximum_units Jsii::Type.check_type(@maximum_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumUnits") unless @maximum_units.nil? @minimum_units = minimum_units Jsii::Type.check_type(@minimum_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minimumUnits") unless @minimum_units.nil? @scaling_policy = scaling_policy.is_a?(Hash) ? ::AWSCDK::Cassandra::CfnTable::ScalingPolicyProperty.new(**scaling_policy.transform_keys(&:to_sym)) : scaling_policy Jsii::Type.check_type(@scaling_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jYXNzYW5kcmEuQ2ZuVGFibGUuU2NhbGluZ1BvbGljeVByb3BlcnR5In1dfX0=")), "scalingPolicy") unless @scaling_policy.nil? end |
Instance Attribute Details
#auto_scaling_disabled ⇒ Boolean, ... (readonly)
Default: - false
This optional parameter enables auto scaling for the table if set to false .
720 721 722 |
# File 'cassandra/cfn_table.rb', line 720 def auto_scaling_disabled @auto_scaling_disabled end |
#maximum_units ⇒ Numeric? (readonly)
Manage costs by specifying the maximum amount of throughput to provision.
The value must be between 1 and the max throughput per second quota for your account (40,000 by default).
727 728 729 |
# File 'cassandra/cfn_table.rb', line 727 def maximum_units @maximum_units end |
#minimum_units ⇒ Numeric? (readonly)
The minimum level of throughput the table should always be ready to support.
The value must be between 1 and the max throughput per second quota for your account (40,000 by default).
734 735 736 |
# File 'cassandra/cfn_table.rb', line 734 def minimum_units @minimum_units end |
#scaling_policy ⇒ AWSCDK::IResolvable, ... (readonly)
Amazon Keyspaces supports the target tracking auto scaling policy.
With this policy, Amazon Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near the target value that you specify. You define the target value as a percentage between 20 and 90.
741 742 743 |
# File 'cassandra/cfn_table.rb', line 741 def scaling_policy @scaling_policy end |
Class Method Details
.jsii_properties ⇒ Object
743 744 745 746 747 748 749 750 |
# File 'cassandra/cfn_table.rb', line 743 def self.jsii_properties { :auto_scaling_disabled => "autoScalingDisabled", :maximum_units => "maximumUnits", :minimum_units => "minimumUnits", :scaling_policy => "scalingPolicy", } end |
Instance Method Details
#to_jsii ⇒ Object
752 753 754 755 756 757 758 759 760 761 |
# File 'cassandra/cfn_table.rb', line 752 def to_jsii result = {} result.merge!({ "autoScalingDisabled" => @auto_scaling_disabled, "maximumUnits" => @maximum_units, "minimumUnits" => @minimum_units, "scalingPolicy" => @scaling_policy, }) result.compact end |