aws-cdk-lib.aws_cloudwatch.CfnAlarm.MetricProperty

interface MetricProperty

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.CfnAlarm.MetricProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#CfnAlarm_MetricProperty
Javasoftware.amazon.awscdk.services.cloudwatch.CfnAlarm.MetricProperty
Pythonaws_cdk.aws_cloudwatch.CfnAlarm.MetricProperty
TypeScript aws-cdk-lib » aws_cloudwatch » CfnAlarm » MetricProperty

The Metric property type represents a specific metric.

Metric is a property of the MetricStat property type.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const metricProperty: cloudwatch.CfnAlarm.MetricProperty = {
  dimensions: [{
    name: 'name',
    value: 'value',
  }],
  metricName: 'metricName',
  namespace: 'namespace',
};

Properties

NameTypeDescription
dimensions?IResolvable | IResolvable | DimensionProperty[]The metric dimensions that you want to be used for the metric that the alarm will watch.
metricName?stringThe name of the metric that you want the alarm to watch.
namespace?stringThe namespace of the metric that the alarm will watch.

dimensions?

Type: IResolvable | IResolvable | DimensionProperty[] (optional)

The metric dimensions that you want to be used for the metric that the alarm will watch.


metricName?

Type: string (optional)

The name of the metric that you want the alarm to watch.

This is a required field.


namespace?

Type: string (optional)

The namespace of the metric that the alarm will watch.