Class: AWSCDK::ApplicationAutoScaling::CfnScalingPolicy::PredictiveScalingPredefinedMetricPairProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
application_auto_scaling/cfn_scaling_policy.rb

Overview

Represents a metric pair for a predictive scaling policy.

The following predefined metrics are available for predictive scaling:

  • ECSServiceAverageCPUUtilization
  • ECSServiceAverageMemoryUtilization
  • ECSServiceCPUUtilization
  • ECSServiceMemoryUtilization
  • ECSServiceTotalCPUUtilization
  • ECSServiceTotalMemoryUtilization
  • ALBRequestCount
  • ALBRequestCountPerTarget
  • TotalALBRequestCount

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(predefined_metric_type:, resource_label: nil) ⇒ PredictiveScalingPredefinedMetricPairProperty

Returns a new instance of PredictiveScalingPredefinedMetricPairProperty.

Parameters:

  • predefined_metric_type (String)

    Indicates which metrics to use.

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

    A label that uniquely identifies a specific target group from which to determine the total and average request count.



1420
1421
1422
1423
1424
1425
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1420

def initialize(predefined_metric_type:, resource_label: nil)
  @predefined_metric_type = predefined_metric_type
  Jsii::Type.check_type(@predefined_metric_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "predefinedMetricType")
  @resource_label = resource_label
  Jsii::Type.check_type(@resource_label, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceLabel") unless @resource_label.nil?
end

Instance Attribute Details

#predefined_metric_typeString (readonly)

Indicates which metrics to use.

There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric.



1433
1434
1435
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1433

def predefined_metric_type
  @predefined_metric_type
end

#resource_labelString? (readonly)

A label that uniquely identifies a specific target group from which to determine the total and average request count.



1438
1439
1440
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1438

def resource_label
  @resource_label
end

Class Method Details

.jsii_propertiesObject



1440
1441
1442
1443
1444
1445
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1440

def self.jsii_properties
  {
    :predefined_metric_type => "predefinedMetricType",
    :resource_label => "resourceLabel",
  }
end

Instance Method Details

#to_jsiiObject



1447
1448
1449
1450
1451
1452
1453
1454
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1447

def to_jsii
  result = {}
  result.merge!({
    "predefinedMetricType" => @predefined_metric_type,
    "resourceLabel" => @resource_label,
  })
  result.compact
end