Class CfnAlarmModel
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.iotevents.CfnAlarmModel
- All Implemented Interfaces:
IInspectable,ITaggable,IAlarmModelRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:40.264Z")
@Stability(Stable)
public class CfnAlarmModel
extends CfnResource
implements IInspectable, IAlarmModelRef, ITaggable
Represents an alarm model to monitor an AWS IoT Events input attribute.
You can use the alarm to get notified when the value is outside a specified range. For more information, see Create an alarm model in the AWS IoT Events Developer Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iotevents.*;
CfnAlarmModel cfnAlarmModel = CfnAlarmModel.Builder.create(this, "MyCfnAlarmModel")
.alarmRule(AlarmRuleProperty.builder()
.simpleRule(SimpleRuleProperty.builder()
.comparisonOperator("comparisonOperator")
.inputProperty("inputProperty")
.threshold("threshold")
.build())
.build())
.roleArn("roleArn")
// the properties below are optional
.alarmCapabilities(AlarmCapabilitiesProperty.builder()
.acknowledgeFlow(AcknowledgeFlowProperty.builder()
.enabled(false)
.build())
.initializationConfiguration(InitializationConfigurationProperty.builder()
.disabledOnInitialization(false)
.build())
.build())
.alarmEventActions(AlarmEventActionsProperty.builder()
.alarmActions(List.of(AlarmActionProperty.builder()
.dynamoDb(DynamoDBProperty.builder()
.hashKeyField("hashKeyField")
.hashKeyValue("hashKeyValue")
.tableName("tableName")
// the properties below are optional
.hashKeyType("hashKeyType")
.operation("operation")
.payload(PayloadProperty.builder()
.contentExpression("contentExpression")
.type("type")
.build())
.payloadField("payloadField")
.rangeKeyField("rangeKeyField")
.rangeKeyType("rangeKeyType")
.rangeKeyValue("rangeKeyValue")
.build())
.dynamoDBv2(DynamoDBv2Property.builder()
.tableName("tableName")
// the properties below are optional
.payload(PayloadProperty.builder()
.contentExpression("contentExpression")
.type("type")
.build())
.build())
.firehose(FirehoseProperty.builder()
.deliveryStreamName("deliveryStreamName")
// the properties below are optional
.payload(PayloadProperty.builder()
.contentExpression("contentExpression")
.type("type")
.build())
.separator("separator")
.build())
.iotEvents(IotEventsProperty.builder()
.inputName("inputName")
// the properties below are optional
.payload(PayloadProperty.builder()
.contentExpression("contentExpression")
.type("type")
.build())
.build())
.iotSiteWise(IotSiteWiseProperty.builder()
.assetId("assetId")
.entryId("entryId")
.propertyAlias("propertyAlias")
.propertyId("propertyId")
.propertyValue(AssetPropertyValueProperty.builder()
.value(AssetPropertyVariantProperty.builder()
.booleanValue("booleanValue")
.doubleValue("doubleValue")
.integerValue("integerValue")
.stringValue("stringValue")
.build())
// the properties below are optional
.quality("quality")
.timestamp(AssetPropertyTimestampProperty.builder()
.timeInSeconds("timeInSeconds")
// the properties below are optional
.offsetInNanos("offsetInNanos")
.build())
.build())
.build())
.iotTopicPublish(IotTopicPublishProperty.builder()
.mqttTopic("mqttTopic")
// the properties below are optional
.payload(PayloadProperty.builder()
.contentExpression("contentExpression")
.type("type")
.build())
.build())
.lambda(LambdaProperty.builder()
.functionArn("functionArn")
// the properties below are optional
.payload(PayloadProperty.builder()
.contentExpression("contentExpression")
.type("type")
.build())
.build())
.sns(SnsProperty.builder()
.targetArn("targetArn")
// the properties below are optional
.payload(PayloadProperty.builder()
.contentExpression("contentExpression")
.type("type")
.build())
.build())
.sqs(SqsProperty.builder()
.queueUrl("queueUrl")
// the properties below are optional
.payload(PayloadProperty.builder()
.contentExpression("contentExpression")
.type("type")
.build())
.useBase64(false)
.build())
.build()))
.build())
.alarmModelDescription("alarmModelDescription")
.alarmModelName("alarmModelName")
.key("key")
.severity(123)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSpecifies whether to get notified for alarm state changes.static interfaceSpecifies one of the following actions to receive notifications when the alarm state changes.static interfaceContains the configuration information of alarm state changes.static interfaceContains information about one or more alarm actions.static interfaceDefines when your alarm is invoked.static interfaceA structure that contains timestamp information.static interfaceA structure that contains value information.static interfaceA structure that contains an asset property value.static final classA fluent builder forCfnAlarmModel.static interfaceDefines an action to write to the Amazon DynamoDB table that you created.static interfaceDefines an action to write to the Amazon DynamoDB table that you created.static interfaceSends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.static interfaceSpecifies the default alarm state.static interfaceSends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.static interfaceSends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .static interfaceInformation required to publish the MQTT message through the AWS IoT message broker.static interfaceCalls a Lambda function, passing in information about the detector model instance and the event that triggered the action.static interfaceInformation needed to configure the payload.static interfaceA rule that compares an input property value to a threshold value with a comparison operator.static interfaceInformation required to publish the Amazon SNS message.static interfaceSends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.iotevents.IAlarmModelRef
IAlarmModelRef.Jsii$Default, IAlarmModelRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnAlarmModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAlarmModel(software.amazon.jsii.JsiiObjectRef objRef) CfnAlarmModel(software.constructs.Construct scope, String id, CfnAlarmModelProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IAlarmModelReffromAlarmModelName(software.constructs.Construct scope, String id, String alarmModelName) Creates a new IAlarmModelRef from a alarmModelName.Contains the configuration information of alarm state changes.Contains information about one or more alarm actions.The description of the alarm model.The name of the alarm model.A reference to a AlarmModel resource.Defines when your alarm is invoked.getKey()An input attribute used as a key to create an alarm.The ARN of the IAM role that allows the alarm to perform actions and access AWS resources.A non-negative integer that reflects the severity level of the alarm.getTags()Tag Manager which manages the tags for this resource.A list of key-value pairs that contain metadata for the alarm model.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAlarmCapabilities(IResolvable value) Contains the configuration information of alarm state changes.voidContains the configuration information of alarm state changes.voidsetAlarmEventActions(IResolvable value) Contains information about one or more alarm actions.voidContains information about one or more alarm actions.voidsetAlarmModelDescription(String value) The description of the alarm model.voidsetAlarmModelName(String value) The name of the alarm model.voidsetAlarmRule(IResolvable value) Defines when your alarm is invoked.voidDefines when your alarm is invoked.voidAn input attribute used as a key to create an alarm.voidsetRoleArn(String value) The ARN of the IAM role that allows the alarm to perform actions and access AWS resources.voidsetSeverity(Number value) A non-negative integer that reflects the severity level of the alarm.voidsetTagsRaw(List<CfnTag> value) A list of key-value pairs that contain metadata for the alarm model.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAlarmModel
protected CfnAlarmModel(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAlarmModel
protected CfnAlarmModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAlarmModel
@Stability(Stable) public CfnAlarmModel(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAlarmModelProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
fromAlarmModelName
@Stability(Stable) @NotNull public static IAlarmModelRef fromAlarmModelName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String alarmModelName) Creates a new IAlarmModelRef from a alarmModelName.- Parameters:
scope- This parameter is required.id- This parameter is required.alarmModelName- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAlarmModelRef
A reference to a AlarmModel resource.- Specified by:
getAlarmModelRefin interfaceIAlarmModelRef
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAlarmRule
Defines when your alarm is invoked.Returns union: either
IResolvableorCfnAlarmModel.AlarmRuleProperty -
setAlarmRule
Defines when your alarm is invoked. -
setAlarmRule
Defines when your alarm is invoked. -
getRoleArn
The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. -
setRoleArn
The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. -
getAlarmCapabilities
Contains the configuration information of alarm state changes.Returns union: either
IResolvableorCfnAlarmModel.AlarmCapabilitiesProperty -
setAlarmCapabilities
Contains the configuration information of alarm state changes. -
setAlarmCapabilities
@Stability(Stable) public void setAlarmCapabilities(@Nullable CfnAlarmModel.AlarmCapabilitiesProperty value) Contains the configuration information of alarm state changes. -
getAlarmEventActions
Contains information about one or more alarm actions.Returns union: either
IResolvableorCfnAlarmModel.AlarmEventActionsProperty -
setAlarmEventActions
Contains information about one or more alarm actions. -
setAlarmEventActions
@Stability(Stable) public void setAlarmEventActions(@Nullable CfnAlarmModel.AlarmEventActionsProperty value) Contains information about one or more alarm actions. -
getAlarmModelDescription
The description of the alarm model. -
setAlarmModelDescription
The description of the alarm model. -
getAlarmModelName
The name of the alarm model. -
setAlarmModelName
The name of the alarm model. -
getKey
An input attribute used as a key to create an alarm. -
setKey
An input attribute used as a key to create an alarm. -
getSeverity
A non-negative integer that reflects the severity level of the alarm. -
setSeverity
A non-negative integer that reflects the severity level of the alarm. -
getTagsRaw
A list of key-value pairs that contain metadata for the alarm model. -
setTagsRaw
A list of key-value pairs that contain metadata for the alarm model.
-