interface TargetTrackingMetricStatProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AutoScaling.CfnScalingPolicy.TargetTrackingMetricStatProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#CfnScalingPolicy_TargetTrackingMetricStatProperty |
![]() | software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty |
![]() | aws_cdk.aws_autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty |
![]() | aws-cdk-lib » aws_autoscaling » CfnScalingPolicy » TargetTrackingMetricStatProperty |
This structure defines the CloudWatch metric to return, along with the statistic and unit.
TargetTrackingMetricStat
is a property of the TargetTrackingMetricDataQuery object.
For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts in the Amazon CloudWatch User Guide .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
const targetTrackingMetricStatProperty: autoscaling.CfnScalingPolicy.TargetTrackingMetricStatProperty = {
metric: {
metricName: 'metricName',
namespace: 'namespace',
// the properties below are optional
dimensions: [{
name: 'name',
value: 'value',
}],
},
stat: 'stat',
// the properties below are optional
period: 123,
unit: 'unit',
};
Properties
Name | Type | Description |
---|---|---|
metric | IResolvable | Metric | The metric to use. |
stat | string | The statistic to return. |
period? | number | The period of the metric in seconds. |
unit? | string | The unit to use for the returned data points. |
metric
Type:
IResolvable
|
Metric
The metric to use.
stat
Type:
string
The statistic to return.
It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide .
The most commonly used metric for scaling is Average
.
period?
Type:
number
(optional)
The period of the metric in seconds.
The default value is 60. Accepted values are 10, 30, and 60. For high resolution metric, set the value to less than 60. For more information, see Create a target tracking policy using high-resolution metrics for faster response .
unit?
Type:
string
(optional)
The unit to use for the returned data points.
For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .