Class: Aws::IoTEvents::Types::AlarmAction

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb

Overview

Note:

When making an API call, you may pass AlarmAction data as a hash:

{
  sns: {
    target_arn: "AmazonResourceName", # required
    payload: {
      content_expression: "ContentExpression", # required
      type: "STRING", # required, accepts STRING, JSON
    },
  },
  iot_topic_publish: {
    mqtt_topic: "MQTTTopic", # required
    payload: {
      content_expression: "ContentExpression", # required
      type: "STRING", # required, accepts STRING, JSON
    },
  },
  lambda: {
    function_arn: "AmazonResourceName", # required
    payload: {
      content_expression: "ContentExpression", # required
      type: "STRING", # required, accepts STRING, JSON
    },
  },
  iot_events: {
    input_name: "InputName", # required
    payload: {
      content_expression: "ContentExpression", # required
      type: "STRING", # required, accepts STRING, JSON
    },
  },
  sqs: {
    queue_url: "QueueUrl", # required
    use_base_64: false,
    payload: {
      content_expression: "ContentExpression", # required
      type: "STRING", # required, accepts STRING, JSON
    },
  },
  firehose: {
    delivery_stream_name: "DeliveryStreamName", # required
    separator: "FirehoseSeparator",
    payload: {
      content_expression: "ContentExpression", # required
      type: "STRING", # required, accepts STRING, JSON
    },
  },
  dynamo_db: {
    hash_key_type: "DynamoKeyType",
    hash_key_field: "DynamoKeyField", # required
    hash_key_value: "DynamoKeyValue", # required
    range_key_type: "DynamoKeyType",
    range_key_field: "DynamoKeyField",
    range_key_value: "DynamoKeyValue",
    operation: "DynamoOperation",
    payload_field: "DynamoKeyField",
    table_name: "DynamoTableName", # required
    payload: {
      content_expression: "ContentExpression", # required
      type: "STRING", # required, accepts STRING, JSON
    },
  },
  dynamo_d_bv_2: {
    table_name: "DynamoTableName", # required
    payload: {
      content_expression: "ContentExpression", # required
      type: "STRING", # required, accepts STRING, JSON
    },
  },
  iot_site_wise: {
    entry_id: "AssetPropertyEntryId",
    asset_id: "AssetId",
    property_id: "AssetPropertyId",
    property_alias: "AssetPropertyAlias",
    property_value: {
      value: {
        string_value: "AssetPropertyStringValue",
        integer_value: "AssetPropertyIntegerValue",
        double_value: "AssetPropertyDoubleValue",
        boolean_value: "AssetPropertyBooleanValue",
      },
      timestamp: {
        time_in_seconds: "AssetPropertyTimeInSeconds", # required
        offset_in_nanos: "AssetPropertyOffsetInNanos",
      },
      quality: "AssetPropertyQuality",
    },
  },
}

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

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#dynamo_d_bv_2Types::DynamoDBv2Action

Defines an action to write to the Amazon DynamoDB table that you created. 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'.

  • For references, you must specify either variables or input values. For example, the value for the tableName parameter can be $variable.ddbtableName.

  • For a substitution template, you must use $\{\}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.

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

    '\{"sensorID": "$\{$input.GreenhouseInput.sensor_id\}", "temperature": "$\{$input.GreenhouseInput.temperature * 9 / 5 + 32\}"\}'

  • For a string concatenation, you must use +. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.

    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.



520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb', line 520

class AlarmAction < Struct.new(
  :sns,
  :iot_topic_publish,
  :lambda,
  :iot_events,
  :sqs,
  :firehose,
  :dynamo_db,
  :dynamo_d_bv_2,
  :iot_site_wise)
  SENSITIVE = []
  include Aws::Structure
end

#dynamo_dbTypes::DynamoDBAction

Defines an action to write to the Amazon DynamoDB table that you created. 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'.

  • For references, you must specify either variables or input values. For example, the value for the hashKeyField parameter can be $input.GreenhouseInput.name.

  • For a substitution template, you must use $\{\}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.

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

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

  • For a string concatenation, you must use +. A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.

    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.



520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb', line 520

class AlarmAction < Struct.new(
  :sns,
  :iot_topic_publish,
  :lambda,
  :iot_events,
  :sqs,
  :firehose,
  :dynamo_db,
  :dynamo_d_bv_2,
  :iot_site_wise)
  SENSITIVE = []
  include Aws::Structure
end

#firehoseTypes::FirehoseAction

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



520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb', line 520

class AlarmAction < Struct.new(
  :sns,
  :iot_topic_publish,
  :lambda,
  :iot_events,
  :sqs,
  :firehose,
  :dynamo_db,
  :dynamo_d_bv_2,
  :iot_site_wise)
  SENSITIVE = []
  include Aws::Structure
end

#iot_eventsTypes::IotEventsAction

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



520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb', line 520

class AlarmAction < Struct.new(
  :sns,
  :iot_topic_publish,
  :lambda,
  :iot_events,
  :sqs,
  :firehose,
  :dynamo_db,
  :dynamo_d_bv_2,
  :iot_site_wise)
  SENSITIVE = []
  include Aws::Structure
end

#iot_site_wiseTypes::IotSiteWiseAction

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

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'.

  • For references, you must specify either variables or input values. For example, the value for the assetId parameter can be $input.TurbineInput.assetId1.

  • For a substitution template, you must use $\{\}, and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.

    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.



520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb', line 520

class AlarmAction < Struct.new(
  :sns,
  :iot_topic_publish,
  :lambda,
  :iot_events,
  :sqs,
  :firehose,
  :dynamo_db,
  :dynamo_d_bv_2,
  :iot_site_wise)
  SENSITIVE = []
  include Aws::Structure
end

#iot_topic_publishTypes::IotTopicPublishAction

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



520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb', line 520

class AlarmAction < Struct.new(
  :sns,
  :iot_topic_publish,
  :lambda,
  :iot_events,
  :sqs,
  :firehose,
  :dynamo_db,
  :dynamo_d_bv_2,
  :iot_site_wise)
  SENSITIVE = []
  include Aws::Structure
end

#lambdaTypes::LambdaAction

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

Returns:



520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb', line 520

class AlarmAction < Struct.new(
  :sns,
  :iot_topic_publish,
  :lambda,
  :iot_events,
  :sqs,
  :firehose,
  :dynamo_db,
  :dynamo_d_bv_2,
  :iot_site_wise)
  SENSITIVE = []
  include Aws::Structure
end

#snsTypes::SNSTopicPublishAction

Information required to publish the Amazon SNS message.



520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb', line 520

class AlarmAction < Struct.new(
  :sns,
  :iot_topic_publish,
  :lambda,
  :iot_events,
  :sqs,
  :firehose,
  :dynamo_db,
  :dynamo_d_bv_2,
  :iot_site_wise)
  SENSITIVE = []
  include Aws::Structure
end

#sqsTypes::SqsAction

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

Returns:



520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'gems/aws-sdk-iotevents/lib/aws-sdk-iotevents/types.rb', line 520

class AlarmAction < Struct.new(
  :sns,
  :iot_topic_publish,
  :lambda,
  :iot_events,
  :sqs,
  :firehose,
  :dynamo_db,
  :dynamo_d_bv_2,
  :iot_site_wise)
  SENSITIVE = []
  include Aws::Structure
end