Class: AWSCDK::AutoScalingPlans::CfnScalingPlan::PredefinedScalingMetricSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AutoScalingPlans::CfnScalingPlan::PredefinedScalingMetricSpecificationProperty
- Defined in:
- auto_scaling_plans/cfn_scaling_plan.rb
Overview
PredefinedScalingMetricSpecification is a subproperty of TargetTrackingConfiguration that specifies a customized scaling metric for a target tracking configuration to use with a scaling plan.
Instance Attribute Summary collapse
-
#predefined_scaling_metric_type ⇒ String
readonly
The metric type.
-
#resource_label ⇒ String?
readonly
Identifies the resource associated with the metric type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(predefined_scaling_metric_type:, resource_label: nil) ⇒ PredefinedScalingMetricSpecificationProperty
constructor
A new instance of PredefinedScalingMetricSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(predefined_scaling_metric_type:, resource_label: nil) ⇒ PredefinedScalingMetricSpecificationProperty
Returns a new instance of PredefinedScalingMetricSpecificationProperty.
858 859 860 861 862 863 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 858 def initialize(predefined_scaling_metric_type:, resource_label: nil) @predefined_scaling_metric_type = predefined_scaling_metric_type Jsii::Type.check_type(@predefined_scaling_metric_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "predefinedScalingMetricType") @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_scaling_metric_type ⇒ String (readonly)
The metric type.
The ALBRequestCountPerTarget metric type applies only to Auto Scaling groups, Spot Fleet requests, and ECS services.
871 872 873 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 871 def predefined_scaling_metric_type @predefined_scaling_metric_type end |
#resource_label ⇒ String? (readonly)
Identifies the resource associated with the metric type.
You can't specify a resource label unless the metric type is ALBRequestCountPerTarget and there is a target group for an Application Load Balancer attached to the Auto Scaling group, Spot Fleet request, or ECS service.
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 is app/
- app/
/ is the final portion of the load balancer ARN - targetgroup/
/ is the final portion of the target group ARN.
This is an example: app/EC2Co-EcsEl-1TKLTMITMM0EO/f37c06a68c1748aa/targetgroup/EC2Co-Defau-LDNM7Q3ZH1ZN/6d4ea56ca2d6a18d.
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.
887 888 889 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 887 def resource_label @resource_label end |
Class Method Details
.jsii_properties ⇒ Object
889 890 891 892 893 894 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 889 def self.jsii_properties { :predefined_scaling_metric_type => "predefinedScalingMetricType", :resource_label => "resourceLabel", } end |
Instance Method Details
#to_jsii ⇒ Object
896 897 898 899 900 901 902 903 |
# File 'auto_scaling_plans/cfn_scaling_plan.rb', line 896 def to_jsii result = {} result.merge!({ "predefinedScalingMetricType" => @predefined_scaling_metric_type, "resourceLabel" => @resource_label, }) result.compact end |