Show / Hide Table of Contents

Class CfnAlarmModel.AlarmActionProperty

Specifies one of the following actions to receive notifications when the alarm state changes.

Inheritance
System.Object
CfnAlarmModel.AlarmActionProperty
Implements
CfnAlarmModel.IAlarmActionProperty
Namespace: Amazon.CDK.AWS.IoTEvents
Assembly: Amazon.CDK.AWS.IoTEvents.dll
Syntax (csharp)
public class AlarmActionProperty : Object, CfnAlarmModel.IAlarmActionProperty
Syntax (vb)
Public Class AlarmActionProperty
    Inherits Object
    Implements CfnAlarmModel.IAlarmActionProperty
Remarks

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoTEvents;

var alarmActionProperty = new AlarmActionProperty {
    DynamoDb = new DynamoDBProperty {
        HashKeyField = "hashKeyField",
        HashKeyValue = "hashKeyValue",
        TableName = "tableName",

        // the properties below are optional
        HashKeyType = "hashKeyType",
        Operation = "operation",
        Payload = new PayloadProperty {
            ContentExpression = "contentExpression",
            Type = "type"
        },
        PayloadField = "payloadField",
        RangeKeyField = "rangeKeyField",
        RangeKeyType = "rangeKeyType",
        RangeKeyValue = "rangeKeyValue"
    },
    DynamoDBv2 = new DynamoDBv2Property {
        TableName = "tableName",

        // the properties below are optional
        Payload = new PayloadProperty {
            ContentExpression = "contentExpression",
            Type = "type"
        }
    },
    Firehose = new FirehoseProperty {
        DeliveryStreamName = "deliveryStreamName",

        // the properties below are optional
        Payload = new PayloadProperty {
            ContentExpression = "contentExpression",
            Type = "type"
        },
        Separator = "separator"
    },
    IotEvents = new IotEventsProperty {
        InputName = "inputName",

        // the properties below are optional
        Payload = new PayloadProperty {
            ContentExpression = "contentExpression",
            Type = "type"
        }
    },
    IotSiteWise = new IotSiteWiseProperty {
        AssetId = "assetId",
        EntryId = "entryId",
        PropertyAlias = "propertyAlias",
        PropertyId = "propertyId",
        PropertyValue = new AssetPropertyValueProperty {
            Value = new AssetPropertyVariantProperty {
                BooleanValue = "booleanValue",
                DoubleValue = "doubleValue",
                IntegerValue = "integerValue",
                StringValue = "stringValue"
            },

            // the properties below are optional
            Quality = "quality",
            Timestamp = new AssetPropertyTimestampProperty {
                TimeInSeconds = "timeInSeconds",

                // the properties below are optional
                OffsetInNanos = "offsetInNanos"
            }
        }
    },
    IotTopicPublish = new IotTopicPublishProperty {
        MqttTopic = "mqttTopic",

        // the properties below are optional
        Payload = new PayloadProperty {
            ContentExpression = "contentExpression",
            Type = "type"
        }
    },
    Lambda = new LambdaProperty {
        FunctionArn = "functionArn",

        // the properties below are optional
        Payload = new PayloadProperty {
            ContentExpression = "contentExpression",
            Type = "type"
        }
    },
    Sns = new SnsProperty {
        TargetArn = "targetArn",

        // the properties below are optional
        Payload = new PayloadProperty {
            ContentExpression = "contentExpression",
            Type = "type"
        }
    },
    Sqs = new SqsProperty {
        QueueUrl = "queueUrl",

        // the properties below are optional
        Payload = new PayloadProperty {
            ContentExpression = "contentExpression",
            Type = "type"
        },
        UseBase64 = false
    }
};

Synopsis

Constructors

AlarmActionProperty()

Properties

DynamoDb

Defines an action to write to the Amazon DynamoDB table that you created.

DynamoDBv2

Defines an action to write to the Amazon DynamoDB table that you created.

Firehose

Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

IotEvents

Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.

IotSiteWise

Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .

IotTopicPublish

Information required to publish the MQTT message through the AWS IoT message broker.

Lambda

Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

Sns

Information required to publish the Amazon SNS message.

Sqs

Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

Constructors

AlarmActionProperty()

public AlarmActionProperty()

Properties

DynamoDb

Defines an action to write to the Amazon DynamoDB table that you created.

public object DynamoDb { get; set; }
Property Value

System.Object

Remarks

The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.

You must use expressions for all parameters in DynamoDBAction . The expressions accept literals, operators, functions, references, and substitution templates.

Examples - For literal values, the expressions must contain single quotes. For example, the value for the hashKeyType parameter can be 'STRING' .

    In the following example, the value for the hashKeyValue parameter uses a substitution template.

    '${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'

      In the following example, the value for the tableName parameter uses a string concatenation.

      'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date

      For more information, see Expressions in the AWS IoT Events Developer Guide .

      If the defined payload type is a string, DynamoDBAction writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the payloadField parameter is <payload-field>_raw .

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-dynamodb

      DynamoDBv2

      Defines an action to write to the Amazon DynamoDB table that you created.

      public object DynamoDBv2 { get; set; }
      Property Value

      System.Object

      Remarks

      The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.

      You must use expressions for all parameters in DynamoDBv2Action . The expressions accept literals, operators, functions, references, and substitution templates.

      Examples - For literal values, the expressions must contain single quotes. For example, the value for the tableName parameter can be 'GreenhouseTemperatureTable' .

        In the following example, the value for the contentExpression parameter in Payload uses a substitution template.

        '{&quot;sensorID&quot;: &quot;${$input.GreenhouseInput.sensor_id}&quot;, &quot;temperature&quot;: &quot;${$input.GreenhouseInput.temperature * 9 / 5 + 32}&quot;}'

          In the following example, the value for the tableName parameter uses a string concatenation.

          'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date

          For more information, see Expressions in the AWS IoT Events Developer Guide .

          The value for the type parameter in Payload must be JSON .

          Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-dynamodbv2

          Firehose

          Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

          public object Firehose { get; set; }
          Property Value

          System.Object

          Remarks

          Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-firehose

          IotEvents

          Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.

          public object IotEvents { get; set; }
          Property Value

          System.Object

          Remarks

          Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-iotevents

          IotSiteWise

          Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .

          public object IotSiteWise { get; set; }
          Property Value

          System.Object

          Remarks

          You must use expressions for all parameters in IotSiteWiseAction . The expressions accept literals, operators, functions, references, and substitutions templates.

          Examples - For literal values, the expressions must contain single quotes. For example, the value for the propertyAlias parameter can be '/company/windfarm/3/turbine/7/temperature' .

            In the following example, the value for the propertyAlias parameter uses a substitution template.

            'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'

            You must specify either propertyAlias or both assetId and propertyId to identify the target asset property in AWS IoT SiteWise .

            For more information, see Expressions in the AWS IoT Events Developer Guide .

            Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-iotsitewise

            IotTopicPublish

            Information required to publish the MQTT message through the AWS IoT message broker.

            public object IotTopicPublish { get; set; }
            Property Value

            System.Object

            Remarks

            Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-iottopicpublish

            Lambda

            Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

            public object Lambda { get; set; }
            Property Value

            System.Object

            Remarks

            Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-lambda

            Sns

            Information required to publish the Amazon SNS message.

            public object Sns { get; set; }
            Property Value

            System.Object

            Remarks

            Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-sns

            Sqs

            Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

            public object Sqs { get; set; }
            Property Value

            System.Object

            Remarks

            Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-sqs

            Implements

            CfnAlarmModel.IAlarmActionProperty
            Back to top Generated by DocFX