Class CfnAlarmModel
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::IoTEvents::AlarmModel.
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();
-
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.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnAlarmModel(Construct scope, String id, CfnAlarmModelProps props) Create a newAWS::IoTEvents::AlarmModel.protectedCfnAlarmModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAlarmModel(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionContains 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.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()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.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @NotNull CfnAlarmModelProps props) Create a newAWS::IoTEvents::AlarmModel.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
A list of key-value pairs that contain metadata for the alarm model.The tags help you manage the alarm model. For more information, see Tagging your AWS IoT Events resources in the AWS IoT Events Developer Guide .
You can create up to 50 tags for one alarm model.
-
getAlarmRule
Defines when your alarm is invoked. -
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.For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .
-
setRoleArn
The ARN of the IAM role that allows the alarm to perform actions and access AWS resources.For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .
-
getAlarmCapabilities
Contains the configuration information of alarm state changes. -
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. -
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.AWS IoT Events routes inputs associated with this key to the alarm.
-
setKey
An input attribute used as a key to create an alarm.AWS IoT Events routes inputs associated with this key to the 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.
-