/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include 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
*
* Examples For literal values, the expressions must
* contain single quotes. For example, the value for the For references, you must specify either variables or input values. For
* example, the value for the For a substitution
* template, you must use In the
* following example, the value for the
* For a string concatenation, you must use In the following example, the
* value for the For more information, see Expressions
* in the AWS IoT Events Developer Guide. The value for the
* DynamoDBv2Action
. The expressions accept literals, operators,
* functions, references, and substitution templates.
tableName
* parameter can be 'GreenhouseTemperatureTable'
.tableName
parameter can be
* $variable.ddbtableName
.${}
, and the template must be in single
* quotes. A substitution template can also contain a combination of literals,
* operators, functions, references, and substitution templates.contentExpression
parameter in
* Payload
uses a substitution template. '{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\":
* \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'
+
. A string
* concatenation can also contain a combination of literals, operators, functions,
* references, and substitution templates.tableName
parameter uses a string concatenation. 'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date
* type
parameter in Payload
must be
* JSON
.See Also:
AWS
* API Reference
The name of the DynamoDB table.
*/ inline const Aws::String& GetTableName() const{ return m_tableName; } /** *The name of the DynamoDB table.
*/ inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; } /** *The name of the DynamoDB table.
*/ inline void SetTableName(const Aws::String& value) { m_tableNameHasBeenSet = true; m_tableName = value; } /** *The name of the DynamoDB table.
*/ inline void SetTableName(Aws::String&& value) { m_tableNameHasBeenSet = true; m_tableName = std::move(value); } /** *The name of the DynamoDB table.
*/ inline void SetTableName(const char* value) { m_tableNameHasBeenSet = true; m_tableName.assign(value); } /** *The name of the DynamoDB table.
*/ inline DynamoDBv2Action& WithTableName(const Aws::String& value) { SetTableName(value); return *this;} /** *The name of the DynamoDB table.
*/ inline DynamoDBv2Action& WithTableName(Aws::String&& value) { SetTableName(std::move(value)); return *this;} /** *The name of the DynamoDB table.
*/ inline DynamoDBv2Action& WithTableName(const char* value) { SetTableName(value); return *this;} inline const Payload& GetPayload() const{ return m_payload; } inline bool PayloadHasBeenSet() const { return m_payloadHasBeenSet; } inline void SetPayload(const Payload& value) { m_payloadHasBeenSet = true; m_payload = value; } inline void SetPayload(Payload&& value) { m_payloadHasBeenSet = true; m_payload = std::move(value); } inline DynamoDBv2Action& WithPayload(const Payload& value) { SetPayload(value); return *this;} inline DynamoDBv2Action& WithPayload(Payload&& value) { SetPayload(std::move(value)); return *this;} private: Aws::String m_tableName; bool m_tableNameHasBeenSet = false; Payload m_payload; bool m_payloadHasBeenSet = false; }; } // namespace Model } // namespace IoTEvents } // namespace Aws