Class CloudWatchSetAlarmStateAction
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.iot.actions.alpha.CloudWatchSetAlarmStateAction
- All Implemented Interfaces:
IAction
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:11.957Z")
@Stability(Experimental)
public class CloudWatchSetAlarmStateAction
extends software.amazon.jsii.JsiiObject
implements IAction
(experimental) The action to change the state of an Amazon CloudWatch alarm.
Example:
import software.amazon.awscdk.services.cloudwatch.*; Metric metric = Metric.Builder.create() .namespace("MyNamespace") .metricName("MyMetric") .dimensionsMap(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 TypeClassDescriptionstatic final class
(experimental) A fluent builder forCloudWatchSetAlarmStateAction
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iot.alpha.IAction
IAction.Jsii$Default, IAction.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
CloudWatchSetAlarmStateAction
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CloudWatchSetAlarmStateAction
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
CloudWatchSetAlarmStateAction
protected CloudWatchSetAlarmStateAction(software.amazon.jsii.JsiiObjectRef objRef) -
CloudWatchSetAlarmStateAction
protected CloudWatchSetAlarmStateAction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CloudWatchSetAlarmStateAction
@Stability(Experimental) public CloudWatchSetAlarmStateAction(@NotNull IAlarm alarm, @NotNull CloudWatchSetAlarmStateActionProps props) - Parameters:
alarm
- This parameter is required.props
- This parameter is required.
-