Class: AWSCDK::Autoscaling::CfnScalingPolicy::PredictiveScalingPredefinedLoadMetricProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::CfnScalingPolicy::PredictiveScalingPredefinedLoadMetricProperty
- Defined in:
- autoscaling/cfn_scaling_policy.rb
Overview
Contains load metric information for the PredefinedLoadMetricSpecification property of the AWS::AutoScaling::ScalingPolicy PredictiveScalingMetricSpecification property type.
Does not apply to policies that use a metric pair for the metric specification.
Instance Attribute Summary collapse
-
#predefined_metric_type ⇒ String
readonly
The metric type.
-
#resource_label ⇒ String?
readonly
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(predefined_metric_type:, resource_label: nil) ⇒ PredictiveScalingPredefinedLoadMetricProperty
constructor
A new instance of PredictiveScalingPredefinedLoadMetricProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(predefined_metric_type:, resource_label: nil) ⇒ PredictiveScalingPredefinedLoadMetricProperty
Returns a new instance of PredictiveScalingPredefinedLoadMetricProperty.
1411 1412 1413 1414 1415 1416 |
# File 'autoscaling/cfn_scaling_policy.rb', line 1411 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_type ⇒ String (readonly)
The metric type.
1422 1423 1424 |
# File 'autoscaling/cfn_scaling_policy.rb', line 1422 def predefined_metric_type @predefined_metric_type end |
#resource_label ⇒ String? (readonly)
A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group.
You can't specify a resource label unless the target group is attached to the Auto Scaling group.
You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). The format of the resource label is:
app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff .
Where:
- app/
/ is the final portion of the load balancer ARN - targetgroup/
/ is the final portion of the target group ARN.
To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use the DescribeTargetGroups API operation.
1440 1441 1442 |
# File 'autoscaling/cfn_scaling_policy.rb', line 1440 def resource_label @resource_label end |
Class Method Details
.jsii_properties ⇒ Object
1442 1443 1444 1445 1446 1447 |
# File 'autoscaling/cfn_scaling_policy.rb', line 1442 def self.jsii_properties { :predefined_metric_type => "predefinedMetricType", :resource_label => "resourceLabel", } end |
Instance Method Details
#to_jsii ⇒ Object
1449 1450 1451 1452 1453 1454 1455 1456 |
# File 'autoscaling/cfn_scaling_policy.rb', line 1449 def to_jsii result = {} result.merge!({ "predefinedMetricType" => @predefined_metric_type, "resourceLabel" => @resource_label, }) result.compact end |