aws-cdk-lib.aws_iotevents.CfnAlarmModelProps

interface CfnAlarmModelProps

LanguageType name
.NETAmazon.CDK.AWS.IoTEvents.CfnAlarmModelProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsiotevents#CfnAlarmModelProps
Javasoftware.amazon.awscdk.services.iotevents.CfnAlarmModelProps
Pythonaws_cdk.aws_iotevents.CfnAlarmModelProps
TypeScript aws-cdk-lib » aws_iotevents » CfnAlarmModelProps

Properties for defining a CfnAlarmModel.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iotevents as iotevents } from 'aws-cdk-lib';
const cfnAlarmModelProps: iotevents.CfnAlarmModelProps = {
  alarmRule: {
    simpleRule: {
      comparisonOperator: 'comparisonOperator',
      inputProperty: 'inputProperty',
      threshold: 'threshold',
    },
  },
  roleArn: 'roleArn',

  // the properties below are optional
  alarmCapabilities: {
    acknowledgeFlow: {
      enabled: false,
    },
    initializationConfiguration: {
      disabledOnInitialization: false,
    },
  },
  alarmEventActions: {
    alarmActions: [{
      dynamoDb: {
        hashKeyField: 'hashKeyField',
        hashKeyValue: 'hashKeyValue',
        tableName: 'tableName',

        // the properties below are optional
        hashKeyType: 'hashKeyType',
        operation: 'operation',
        payload: {
          contentExpression: 'contentExpression',
          type: 'type',
        },
        payloadField: 'payloadField',
        rangeKeyField: 'rangeKeyField',
        rangeKeyType: 'rangeKeyType',
        rangeKeyValue: 'rangeKeyValue',
      },
      dynamoDBv2: {
        tableName: 'tableName',

        // the properties below are optional
        payload: {
          contentExpression: 'contentExpression',
          type: 'type',
        },
      },
      firehose: {
        deliveryStreamName: 'deliveryStreamName',

        // the properties below are optional
        payload: {
          contentExpression: 'contentExpression',
          type: 'type',
        },
        separator: 'separator',
      },
      iotEvents: {
        inputName: 'inputName',

        // the properties below are optional
        payload: {
          contentExpression: 'contentExpression',
          type: 'type',
        },
      },
      iotSiteWise: {
        assetId: 'assetId',
        entryId: 'entryId',
        propertyAlias: 'propertyAlias',
        propertyId: 'propertyId',
        propertyValue: {
          value: {
            booleanValue: 'booleanValue',
            doubleValue: 'doubleValue',
            integerValue: 'integerValue',
            stringValue: 'stringValue',
          },

          // the properties below are optional
          quality: 'quality',
          timestamp: {
            timeInSeconds: 'timeInSeconds',

            // the properties below are optional
            offsetInNanos: 'offsetInNanos',
          },
        },
      },
      iotTopicPublish: {
        mqttTopic: 'mqttTopic',

        // the properties below are optional
        payload: {
          contentExpression: 'contentExpression',
          type: 'type',
        },
      },
      lambda: {
        functionArn: 'functionArn',

        // the properties below are optional
        payload: {
          contentExpression: 'contentExpression',
          type: 'type',
        },
      },
      sns: {
        targetArn: 'targetArn',

        // the properties below are optional
        payload: {
          contentExpression: 'contentExpression',
          type: 'type',
        },
      },
      sqs: {
        queueUrl: 'queueUrl',

        // the properties below are optional
        payload: {
          contentExpression: 'contentExpression',
          type: 'type',
        },
        useBase64: false,
      },
    }],
  },
  alarmModelDescription: 'alarmModelDescription',
  alarmModelName: 'alarmModelName',
  key: 'key',
  severity: 123,
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
alarmRuleIResolvable | AlarmRulePropertyDefines when your alarm is invoked.
roleArnstringThe ARN of the IAM role that allows the alarm to perform actions and access AWS resources.
alarmCapabilities?IResolvable | AlarmCapabilitiesPropertyContains the configuration information of alarm state changes.
alarmEventActions?IResolvable | AlarmEventActionsPropertyContains information about one or more alarm actions.
alarmModelDescription?stringThe description of the alarm model.
alarmModelName?stringThe name of the alarm model.
key?stringAn input attribute used as a key to create an alarm.
severity?numberA non-negative integer that reflects the severity level of the alarm.
tags?CfnTag[]A list of key-value pairs that contain metadata for the alarm model.

alarmRule

Type: IResolvable | AlarmRuleProperty

Defines when your alarm is invoked.


roleArn

Type: string

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 .


alarmCapabilities?

Type: IResolvable | AlarmCapabilitiesProperty (optional)

Contains the configuration information of alarm state changes.


alarmEventActions?

Type: IResolvable | AlarmEventActionsProperty (optional)

Contains information about one or more alarm actions.


alarmModelDescription?

Type: string (optional)

The description of the alarm model.


alarmModelName?

Type: string (optional)

The name of the alarm model.


key?

Type: string (optional)

An input attribute used as a key to create an alarm.

AWS IoT Events routes inputs associated with this key to the alarm.


severity?

Type: number (optional)

A non-negative integer that reflects the severity level of the alarm.


tags?

Type: CfnTag[] (optional)

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.