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
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) .
The [metric unit](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Unit) supported by CloudWatch.
The CloudWatch metric value.
The IAM role that allows access to the CloudWatch metric.