Skip to content
v2.274.0

CloudwatchMetricActionProperty Struct ​

Describes an action that captures a CloudWatch metric.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
const cloudwatchMetricActionProperty: iot.CfnTopicRule.CloudwatchMetricActionProperty = {
  metricName: 'metricName',
  metricNamespace: 'metricNamespace',
  metricUnit: 'metricUnit',
  metricValue: 'metricValue',
  roleArn: 'roleArn',

  // the properties below are optional
  metricTimestamp: 'metricTimestamp',
};

Properties ​

metricNamestringmetric_namestrmetricNameStringMetricNamestringMetricName*stringrequired#
The CloudWatch metric name.
metricNamespacestringmetric_namespacestrmetricNamespaceStringMetricNamespacestringMetricNamespace*stringrequired#
The CloudWatch metric namespace name.
metricTimestampstringmetric_timestampstrmetricTimestampStringMetricTimestampstringMetricTimestamp*string#
An optional [Unix timestamp](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp) .
metricUnitstringmetric_unitstrmetricUnitStringMetricUnitstringMetricUnit*stringrequired#
The [metric unit](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Unit) supported by CloudWatch.
metricValuestringmetric_valuestrmetricValueStringMetricValuestringMetricValue*stringrequired#
The CloudWatch metric value.
roleArnstringrole_arnstrroleArnStringRoleArnstringRoleArn*stringrequired#
The IAM role that allows access to the CloudWatch metric.