Interface CloudWatchPutMetricActionProps
- All Superinterfaces:
CommonActionProps,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CloudWatchPutMetricActionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:50.459Z")
@Stability(Experimental)
public interface CloudWatchPutMetricActionProps
extends software.amazon.jsii.JsiiSerializable, CommonActionProps
(experimental) Configuration properties of an action for CloudWatch metric.
Example:
TopicRule topicRule = TopicRule.Builder.create(this, "TopicRule")
.sql(IotSql.fromStringAsVer20160323("SELECT topic(2) as device_id, namespace, unit, value, timestamp FROM 'device/+/data'"))
.actions(List.of(
CloudWatchPutMetricAction.Builder.create()
.metricName("${topic(2)}")
.metricNamespace("${namespace}")
.metricUnit("${unit}")
.metricValue("${value}")
.metricTimestamp("${timestamp}")
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCloudWatchPutMetricActionPropsstatic final classAn implementation forCloudWatchPutMetricActionProps -
Method Summary
Modifier and TypeMethodDescriptionbuilder()(experimental) The CloudWatch metric name.(experimental) The CloudWatch metric namespace name.default String(experimental) A string that contains the timestamp, expressed in seconds in Unix epoch time.(experimental) The metric unit supported by CloudWatch.(experimental) A string that contains the CloudWatch metric value.Methods inherited from interface software.amazon.awscdk.services.iot.actions.alpha.CommonActionProps
getRoleMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getMetricName
(experimental) The CloudWatch metric name.Supports substitution templates.
- See Also:
-
getMetricNamespace
(experimental) The CloudWatch metric namespace name.Supports substitution templates.
- See Also:
-
getMetricUnit
(experimental) The metric unit supported by CloudWatch.Supports substitution templates.
- See Also:
-
getMetricValue
(experimental) A string that contains the CloudWatch metric value.Supports substitution templates.
- See Also:
-
getMetricTimestamp
(experimental) A string that contains the timestamp, expressed in seconds in Unix epoch time.Supports substitution templates.
Default: - none -- Defaults to the current Unix epoch time.
- See Also:
-
builder
-