Class: AWSCDK::Cassandra::CfnTable::AutoScalingSettingProperty

Inherits:
Jsii::Struct
  • Object
show all
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 the target tracking scaling 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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auto_scaling_disabled: nil, maximum_units: nil, minimum_units: nil, scaling_policy: nil) ⇒ AutoScalingSettingProperty

Returns a new instance of AutoScalingSettingProperty.

Parameters:

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

    This optional parameter enables auto scaling for the table if set to false .

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

    Manage costs by specifying the maximum amount of throughput to provision.

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

    The minimum level of throughput the table should always be ready to support.

  • scaling_policy (AWSCDK::IResolvable, AWSCDK::Cassandra::CfnTable::ScalingPolicyProperty, nil) (defaults to: nil)

    Amazon Keyspaces supports the target tracking auto scaling policy.



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_disabledBoolean, ... (readonly)

Note:

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_unitsNumeric? (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_unitsNumeric? (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_policyAWSCDK::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_propertiesObject



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_jsiiObject



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