Class: AWSCDK::Cassandra::CfnTable::TargetTrackingScalingPolicyConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cassandra/cfn_table.rb

Overview

Amazon Keyspaces supports the target tracking auto scaling policy for a provisioned table.

This policy scales a table based on the ratio of consumed to provisioned capacity. The auto scaling target is a percentage of the provisioned capacity of the table.

  • target_tracking_scaling_policy_configuration : To define the target tracking policy, you must define the target value.
  • target_value : The target utilization rate of the table. Amazon Keyspaces auto scaling ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define target_value as a percentage. A double between 20 and 90. (Required)
  • disable_scale_in : A boolean that specifies if scale-in is disabled or enabled for the table. This parameter is disabled by default. To turn on scale-in , set the boolean value to FALSE . This means that capacity for a table can be automatically scaled down on your behalf. (Optional)
  • scale_in_cooldown : A cooldown period in seconds between scaling activities that lets the table stabilize before another scale in activity starts. If no value is provided, the default is 0. (Optional)
  • scale_out_cooldown : A cooldown period in seconds between scaling activities that lets the table stabilize before another scale out activity starts. If no value is provided, the default is 0. (Optional)

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_value:, disable_scale_in: nil, scale_in_cooldown: nil, scale_out_cooldown: nil) ⇒ TargetTrackingScalingPolicyConfigurationProperty

Returns a new instance of TargetTrackingScalingPolicyConfigurationProperty.

Parameters:

  • target_value (Numeric)

    Specifies the target value for the target tracking auto scaling policy.

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

    Specifies if scale-in is enabled.

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

    Specifies a scale-in cool down period.

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

    Specifies a scale out cool down period.



1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
# File 'cassandra/cfn_table.rb', line 1236

def initialize(target_value:, disable_scale_in: nil, scale_in_cooldown: nil, scale_out_cooldown: nil)
  @target_value = target_value
  Jsii::Type.check_type(@target_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetValue")
  @disable_scale_in = disable_scale_in
  Jsii::Type.check_type(@disable_scale_in, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "disableScaleIn") unless @disable_scale_in.nil?
  @scale_in_cooldown = scale_in_cooldown
  Jsii::Type.check_type(@scale_in_cooldown, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scaleInCooldown") unless @scale_in_cooldown.nil?
  @scale_out_cooldown = scale_out_cooldown
  Jsii::Type.check_type(@scale_out_cooldown, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "scaleOutCooldown") unless @scale_out_cooldown.nil?
end

Instance Attribute Details

#disable_scale_inBoolean, ... (readonly)

Specifies if scale-in is enabled.

When auto scaling automatically decreases capacity for a table, the table scales in . When scaling policies are set, they can't scale in the table lower than its minimum capacity.



1260
1261
1262
# File 'cassandra/cfn_table.rb', line 1260

def disable_scale_in
  @disable_scale_in
end

#scale_in_cooldownNumeric? (readonly)

Note:

Default: - 0

Specifies a scale-in cool down period.

A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts.



1268
1269
1270
# File 'cassandra/cfn_table.rb', line 1268

def scale_in_cooldown
  @scale_in_cooldown
end

#scale_out_cooldownNumeric? (readonly)

Note:

Default: - 0

Specifies a scale out cool down period.

A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts.



1276
1277
1278
# File 'cassandra/cfn_table.rb', line 1276

def scale_out_cooldown
  @scale_out_cooldown
end

#target_valueNumeric (readonly)

Specifies the target value for the target tracking auto scaling policy.

Amazon Keyspaces auto scaling scales up capacity automatically when traffic exceeds this target utilization rate, and then back down when it falls below the target. This ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define target_value as a percentage. An integer between 20 and 90.



1253
1254
1255
# File 'cassandra/cfn_table.rb', line 1253

def target_value
  @target_value
end

Class Method Details

.jsii_propertiesObject



1278
1279
1280
1281
1282
1283
1284
1285
# File 'cassandra/cfn_table.rb', line 1278

def self.jsii_properties
  {
    :target_value => "targetValue",
    :disable_scale_in => "disableScaleIn",
    :scale_in_cooldown => "scaleInCooldown",
    :scale_out_cooldown => "scaleOutCooldown",
  }
end

Instance Method Details

#to_jsiiObject



1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
# File 'cassandra/cfn_table.rb', line 1287

def to_jsii
  result = {}
  result.merge!({
    "targetValue" => @target_value,
    "disableScaleIn" => @disable_scale_in,
    "scaleInCooldown" => @scale_in_cooldown,
    "scaleOutCooldown" => @scale_out_cooldown,
  })
  result.compact
end