interface MetricProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AutoScaling.CfnScalingPolicy.MetricProperty |
![]() | software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.MetricProperty |
![]() | aws_cdk.aws_autoscaling.CfnScalingPolicy.MetricProperty |
![]() | @aws-cdk/aws-autoscaling » CfnScalingPolicy » MetricProperty |
Represents a specific metric.
Metric
is a property of the AWS::AutoScaling::ScalingPolicy MetricStat property type.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as autoscaling from '@aws-cdk/aws-autoscaling';
const metricProperty: autoscaling.CfnScalingPolicy.MetricProperty = {
metricName: 'metricName',
namespace: 'namespace',
// the properties below are optional
dimensions: [{
name: 'name',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
metric | string | The name of the metric. |
namespace | string | The namespace of the metric. |
dimensions? | IResolvable | IResolvable | Metric [] | The dimensions for the metric. |
metricName
Type:
string
The name of the metric.
namespace
Type:
string
The namespace of the metric.
For more information, see the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .
dimensions?
Type:
IResolvable
|
IResolvable
|
Metric
[]
(optional)
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.