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
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-02-12T12:32:04.287Z")
@Stability(Stable)
public class CfnAlarmModel
extends CfnResource
implements IInspectable, 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 interface
Specifies whether to get notified for alarm state changes.static interface
Specifies one of the following actions to receive notifications when the alarm state changes.static interface
Contains the configuration information of alarm state changes.static interface
Contains information about one or more alarm actions.static interface
Defines when your alarm is invoked.static interface
A structure that contains timestamp information.static interface
A structure that contains value information.static interface
A structure that contains an asset property value.static final class
A fluent builder forCfnAlarmModel
.static interface
Defines an action to write to the Amazon DynamoDB table that you created.static interface
Defines an action to write to the Amazon DynamoDB table that you created.static interface
Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.static interface
Specifies the default alarm state.static interface
Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.static interface
Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .static interface
Information required to publish the MQTT message through the AWS IoT message broker.static interface
Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.static interface
Information needed to configure the payload.static interface
A rule that compares an input property value to a threshold value with a comparison operator.static interface
Information required to publish the Amazon SNS message.static interface
Sends 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.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnAlarmModel
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAlarmModel
(software.amazon.jsii.JsiiObjectRef objRef) CfnAlarmModel
(software.constructs.Construct scope, String id, CfnAlarmModelProps props) -
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()
Tag Manager which manages the tags for this resource.A list of key-value pairs that contain metadata for the alarm model.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAlarmCapabilities
(IResolvable value) Contains the configuration information of alarm state changes.void
Contains the configuration information of alarm state changes.void
setAlarmEventActions
(IResolvable value) Contains information about one or more alarm actions.void
Contains information about one or more alarm actions.void
setAlarmModelDescription
(String value) The description of the alarm model.void
setAlarmModelName
(String value) The name of the alarm model.void
setAlarmRule
(IResolvable value) Defines when your alarm is invoked.void
Defines when your alarm is invoked.void
An input attribute used as a key to create an alarm.void
setRoleArn
(String value) The ARN of the IAM role that allows the alarm to perform actions and access AWS resources.void
setSeverity
(Number value) A non-negative integer that reflects the severity level of the alarm.void
setTagsRaw
(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, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
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, wait, wait, wait
Methods 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
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
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. -
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. -
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. -
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.
-