Class: AWSCDK::ApplicationAutoScaling::CfnScalingPolicy::TargetTrackingMetricProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ApplicationAutoScaling::CfnScalingPolicy::TargetTrackingMetricProperty
- Defined in:
- application_auto_scaling/cfn_scaling_policy.rb
Overview
Represents a specific metric for a target tracking scaling policy for Application Auto Scaling.
Metric is a property of the AWS::ApplicationAutoScaling::ScalingPolicy TargetTrackingMetricStat property type.
Instance Attribute Summary collapse
-
#dimensions ⇒ AWSCDK::IResolvable, ...
readonly
The dimensions for the metric.
-
#metric_name ⇒ String?
readonly
The name of the metric.
-
#namespace ⇒ String?
readonly
The namespace of the metric.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dimensions: nil, metric_name: nil, namespace: nil) ⇒ TargetTrackingMetricProperty
constructor
A new instance of TargetTrackingMetricProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dimensions: nil, metric_name: nil, namespace: nil) ⇒ TargetTrackingMetricProperty
Returns a new instance of TargetTrackingMetricProperty.
1818 1819 1820 1821 1822 1823 1824 1825 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1818 def initialize(dimensions: nil, metric_name: nil, namespace: nil) @dimensions = dimensions Jsii::Type.check_type(@dimensions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbGljYXRpb25hdXRvc2NhbGluZy5DZm5TY2FsaW5nUG9saWN5LlRhcmdldFRyYWNraW5nTWV0cmljRGltZW5zaW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "dimensions") unless @dimensions.nil? @metric_name = metric_name Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") unless @metric_name.nil? @namespace = namespace Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") unless @namespace.nil? end |
Instance Attribute Details
#dimensions ⇒ AWSCDK::IResolvable, ... (readonly)
The dimensions for the metric.
For the list of available dimensions, see the AWS documentation available from the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
1835 1836 1837 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1835 def dimensions @dimensions end |
#metric_name ⇒ String? (readonly)
The name of the metric.
1840 1841 1842 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1840 def metric_name @metric_name end |
#namespace ⇒ String? (readonly)
The namespace of the metric.
For more information, see the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .
1847 1848 1849 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1847 def namespace @namespace end |
Class Method Details
.jsii_properties ⇒ Object
1849 1850 1851 1852 1853 1854 1855 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1849 def self.jsii_properties { :dimensions => "dimensions", :metric_name => "metricName", :namespace => "namespace", } end |
Instance Method Details
#to_jsii ⇒ Object
1857 1858 1859 1860 1861 1862 1863 1864 1865 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1857 def to_jsii result = {} result.merge!({ "dimensions" => @dimensions, "metricName" => @metric_name, "namespace" => @namespace, }) result.compact end |