Interface CloudWatchSetAlarmStateActionProps
- All Superinterfaces:
CommonActionProps
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CloudWatchSetAlarmStateActionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:41.988Z")
@Stability(Experimental)
public interface CloudWatchSetAlarmStateActionProps
extends software.amazon.jsii.JsiiSerializable, CommonActionProps
(experimental) Configuration properties of an action for CloudWatch alarm.
Example:
import software.amazon.awscdk.services.cloudwatch.*; Metric metric = Metric.Builder.create() .namespace("MyNamespace") .metricName("MyMetric") .dimensions(Map.of("MyDimension", "MyDimensionValue")) .build(); Alarm alarm = Alarm.Builder.create(this, "MyAlarm") .metric(metric) .threshold(100) .evaluationPeriods(3) .datapointsToAlarm(2) .build(); TopicRule topicRule = TopicRule.Builder.create(this, "TopicRule") .sql(IotSql.fromStringAsVer20160323("SELECT topic(2) as device_id FROM 'device/+/data'")) .actions(List.of( CloudWatchSetAlarmStateAction.Builder.create(alarm) .reason("AWS Iot Rule action is triggered") .alarmStateToSet(AlarmState.ALARM) .build())) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCloudWatchSetAlarmStateActionProps
static final class
An implementation forCloudWatchSetAlarmStateActionProps
-
Method Summary
Methods inherited from interface software.amazon.awscdk.services.iot.actions.CommonActionProps
getRole
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAlarmStateToSet
(experimental) The value of the alarm state to set. -
getReason
(experimental) The reason for the alarm change.Default: None
-
builder
-