Class: AWSCDK::ApplicationAutoScaling::CfnScalingPolicy::PredictiveScalingPredefinedLoadMetricProperty

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

Overview

Describes a load metric for a predictive scaling policy.

When returned in the output of DescribePolicies , it indicates that a predictive scaling policy uses individually specified load and scaling metrics instead of a metric pair.

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) ⇒ PredictiveScalingPredefinedLoadMetricProperty

Returns a new instance of PredictiveScalingPredefinedLoadMetricProperty.

Parameters:

  • predefined_metric_type (String)

    The metric type.

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

    A label that uniquely identifies a target group.



1365
1366
1367
1368
1369
1370
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1365

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)

The metric type.



1376
1377
1378
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1376

def predefined_metric_type
  @predefined_metric_type
end

#resource_labelString? (readonly)

A label that uniquely identifies a target group.



1381
1382
1383
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1381

def resource_label
  @resource_label
end

Class Method Details

.jsii_propertiesObject



1383
1384
1385
1386
1387
1388
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1383

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

Instance Method Details

#to_jsiiObject



1390
1391
1392
1393
1394
1395
1396
1397
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1390

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