aws-cdk-lib.aws_iotevents.CfnDetectorModel.ActionProperty

interface ActionProperty

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

An action to be performed when the condition is TRUE.

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 actionProperty: iotevents.CfnDetectorModel.ActionProperty = {
  clearTimer: {
    timerName: 'timerName',
  },
  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: {
    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',
      },
    },

    // the properties below are optional
    assetId: 'assetId',
    entryId: 'entryId',
    propertyAlias: 'propertyAlias',
    propertyId: 'propertyId',
  },
  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',
    },
  },
  resetTimer: {
    timerName: 'timerName',
  },
  setTimer: {
    timerName: 'timerName',

    // the properties below are optional
    durationExpression: 'durationExpression',
    seconds: 123,
  },
  setVariable: {
    value: 'value',
    variableName: 'variableName',
  },
  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,
  },
};

Properties

NameTypeDescription
clearTimer?IResolvable | ClearTimerPropertyInformation needed to clear the timer.
dynamoDBv2?IResolvable | DynamoDBv2PropertyWrites to the DynamoDB table that you created.
dynamoDb?IResolvable | DynamoDBPropertyWrites to the DynamoDB table that you created.
firehose?IResolvable | FirehosePropertySends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
iotEvents?IResolvable | IotEventsPropertySends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.
iotSiteWise?IResolvable | IotSiteWisePropertySends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .
iotTopicPublish?IResolvable | IotTopicPublishPropertyPublishes an MQTT message with the given topic to the AWS IoT message broker.
lambda?IResolvable | LambdaPropertyCalls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
resetTimer?IResolvable | ResetTimerPropertyInformation needed to reset the timer.
setTimer?IResolvable | SetTimerPropertyInformation needed to set the timer.
setVariable?IResolvable | SetVariablePropertySets a variable to a specified value.
sns?IResolvable | SnsPropertySends an Amazon SNS message.
sqs?IResolvable | SqsPropertySends an Amazon SNS message.

clearTimer?

Type: IResolvable | ClearTimerProperty (optional)

Information needed to clear the timer.


dynamoDBv2?

Type: IResolvable | DynamoDBv2Property (optional)

Writes to the DynamoDB table that you created.

The default action payload contains all attribute-value pairs that have 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. For more information, see Actions in AWS IoT Events Developer Guide .


dynamoDb?

Type: IResolvable | DynamoDBProperty (optional)

Writes to the DynamoDB table that you created.

The default action payload contains all attribute-value pairs that have 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. For more information, see Actions in AWS IoT Events Developer Guide .


firehose?

Type: IResolvable | FirehoseProperty (optional)

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


iotEvents?

Type: IResolvable | IotEventsProperty (optional)

Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.


iotSiteWise?

Type: IResolvable | IotSiteWiseProperty (optional)

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


iotTopicPublish?

Type: IResolvable | IotTopicPublishProperty (optional)

Publishes an MQTT message with the given topic to the AWS IoT message broker.


lambda?

Type: IResolvable | LambdaProperty (optional)

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


resetTimer?

Type: IResolvable | ResetTimerProperty (optional)

Information needed to reset the timer.


setTimer?

Type: IResolvable | SetTimerProperty (optional)

Information needed to set the timer.


setVariable?

Type: IResolvable | SetVariableProperty (optional)

Sets a variable to a specified value.


sns?

Type: IResolvable | SnsProperty (optional)

Sends an Amazon SNS message.


sqs?

Type: IResolvable | SqsProperty (optional)

Sends an Amazon SNS message.