@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.957Z") @Stability(value=Stable) public class CfnAlarmModel extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnAlarmModel.AcknowledgeFlowProperty
Specifies whether to get notified for alarm state changes.
|
static interface |
CfnAlarmModel.AlarmActionProperty
Specifies one of the following actions to receive notifications when the alarm state changes.
|
static interface |
CfnAlarmModel.AlarmCapabilitiesProperty
Contains the configuration information of alarm state changes.
|
static interface |
CfnAlarmModel.AlarmEventActionsProperty
Contains information about one or more alarm actions.
|
static interface |
CfnAlarmModel.AlarmRuleProperty
Defines when your alarm is invoked.
|
static interface |
CfnAlarmModel.AssetPropertyTimestampProperty
A structure that contains timestamp information.
|
static interface |
CfnAlarmModel.AssetPropertyValueProperty
A structure that contains value information.
|
static interface |
CfnAlarmModel.AssetPropertyVariantProperty
A structure that contains an asset property value.
|
static class |
CfnAlarmModel.Builder
A fluent builder for
CfnAlarmModel. |
static interface |
CfnAlarmModel.DynamoDBProperty
Defines an action to write to the Amazon DynamoDB table that you created.
|
static interface |
CfnAlarmModel.DynamoDBv2Property
Defines an action to write to the Amazon DynamoDB table that you created.
|
static interface |
CfnAlarmModel.FirehoseProperty
Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
|
static interface |
CfnAlarmModel.InitializationConfigurationProperty
Specifies the default alarm state.
|
static interface |
CfnAlarmModel.IotEventsProperty
Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
|
static interface |
CfnAlarmModel.IotSiteWiseProperty
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 |
CfnAlarmModel.IotTopicPublishProperty
Information required to publish the MQTT message through the AWS IoT message broker.
|
static interface |
CfnAlarmModel.LambdaProperty
Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
|
static interface |
CfnAlarmModel.PayloadProperty
Information needed to configure the payload.
|
static interface |
CfnAlarmModel.SimpleRuleProperty
A rule that compares an input property value to a threshold value with a comparison operator.
|
static interface |
CfnAlarmModel.SnsProperty
Information required to publish the Amazon SNS message.
|
static interface |
CfnAlarmModel.SqsProperty
Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnAlarmModel(software.constructs.Construct scope,
String id,
CfnAlarmModelProps props)
Create a new `AWS::IoTEvents::AlarmModel`.
|
protected |
CfnAlarmModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnAlarmModel(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAlarmCapabilities()
Contains the configuration information of alarm state changes.
|
Object |
getAlarmEventActions()
Contains information about one or more alarm actions.
|
String |
getAlarmModelDescription()
The description of the alarm model.
|
String |
getAlarmModelName()
The name of the alarm model.
|
Object |
getAlarmRule()
Defines when your alarm is invoked.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getKey()
An input attribute used as a key to create an alarm.
|
String |
getRoleArn()
The ARN of the IAM role that allows the alarm to perform actions and access AWS resources.
|
Number |
getSeverity()
A non-negative integer that reflects the severity level of the alarm.
|
TagManager |
getTags()
A list of key-value pairs that contain metadata for the alarm model.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAlarmCapabilities(CfnAlarmModel.AlarmCapabilitiesProperty value)
Contains the configuration information of alarm state changes.
|
void |
setAlarmCapabilities(IResolvable value)
Contains the configuration information of alarm state changes.
|
void |
setAlarmEventActions(CfnAlarmModel.AlarmEventActionsProperty value)
Contains information about one or more alarm actions.
|
void |
setAlarmEventActions(IResolvable value)
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(CfnAlarmModel.AlarmRuleProperty value)
Defines when your alarm is invoked.
|
void |
setAlarmRule(IResolvable value)
Defines when your alarm is invoked.
|
void |
setKey(String value)
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.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnAlarmModel(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAlarmModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnAlarmModel(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnAlarmModelProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
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.
@Stability(value=Stable) @NotNull public Object getAlarmRule()
@Stability(value=Stable)
public void setAlarmRule(@NotNull
CfnAlarmModel.AlarmRuleProperty value)
@Stability(value=Stable)
public void setAlarmRule(@NotNull
IResolvable value)
@Stability(value=Stable) @NotNull public String getRoleArn()
For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .
@Stability(value=Stable)
public void setRoleArn(@NotNull
String value)
For more information, see Amazon Resource Names (ARNs) in the AWS General Reference .
@Stability(value=Stable) @Nullable public Object getAlarmCapabilities()
@Stability(value=Stable)
public void setAlarmCapabilities(@Nullable
CfnAlarmModel.AlarmCapabilitiesProperty value)
@Stability(value=Stable)
public void setAlarmCapabilities(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getAlarmEventActions()
@Stability(value=Stable)
public void setAlarmEventActions(@Nullable
CfnAlarmModel.AlarmEventActionsProperty value)
@Stability(value=Stable)
public void setAlarmEventActions(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getAlarmModelDescription()
@Stability(value=Stable)
public void setAlarmModelDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getAlarmModelName()
@Stability(value=Stable)
public void setAlarmModelName(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getKey()
AWS IoT Events routes inputs associated with this key to the alarm.
@Stability(value=Stable)
public void setKey(@Nullable
String value)
AWS IoT Events routes inputs associated with this key to the alarm.
@Stability(value=Stable) @Nullable public Number getSeverity()
@Stability(value=Stable)
public void setSeverity(@Nullable
Number value)
Copyright © 2022. All rights reserved.