/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoTEvents { namespace Model { /** *

Defines an action to write to the Amazon DynamoDB table that you created. The * standard 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 also customize the payload. * One column of the DynamoDB table receives all attribute-value pairs in the * payload that you specify.

The tableName and * hashKeyField values must match the table name and the partition key * of the DynamoDB table.

If the DynamoDB table also has a sort key, * you must specify rangeKeyField. The rangeKeyField * value must match the sort key.

The hashKeyValue * and rangeKeyValue use substitution templates. These templates * provide data at runtime. The syntax is ${sql-expression}.

*

You can use expressions for parameters that are string data type. 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 payloadField is * <payload-field>_raw.

See Also:

AWS * API Reference

*/ class AWS_IOTEVENTS_API DynamoDBAction { public: DynamoDBAction(); DynamoDBAction(Aws::Utils::Json::JsonView jsonValue); DynamoDBAction& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

The data type for the hash key (also called the partition key). You can * specify the following values:

  • STRING - The hash * key is a string.

  • NUMBER - The hash key is a * number.

If you don't specify hashKeyType, the * default value is STRING.

*/ inline const Aws::String& GetHashKeyType() const{ return m_hashKeyType; } /** *

The data type for the hash key (also called the partition key). You can * specify the following values:

  • STRING - The hash * key is a string.

  • NUMBER - The hash key is a * number.

If you don't specify hashKeyType, the * default value is STRING.

*/ inline bool HashKeyTypeHasBeenSet() const { return m_hashKeyTypeHasBeenSet; } /** *

The data type for the hash key (also called the partition key). You can * specify the following values:

  • STRING - The hash * key is a string.

  • NUMBER - The hash key is a * number.

If you don't specify hashKeyType, the * default value is STRING.

*/ inline void SetHashKeyType(const Aws::String& value) { m_hashKeyTypeHasBeenSet = true; m_hashKeyType = value; } /** *

The data type for the hash key (also called the partition key). You can * specify the following values:

  • STRING - The hash * key is a string.

  • NUMBER - The hash key is a * number.

If you don't specify hashKeyType, the * default value is STRING.

*/ inline void SetHashKeyType(Aws::String&& value) { m_hashKeyTypeHasBeenSet = true; m_hashKeyType = std::move(value); } /** *

The data type for the hash key (also called the partition key). You can * specify the following values:

  • STRING - The hash * key is a string.

  • NUMBER - The hash key is a * number.

If you don't specify hashKeyType, the * default value is STRING.

*/ inline void SetHashKeyType(const char* value) { m_hashKeyTypeHasBeenSet = true; m_hashKeyType.assign(value); } /** *

The data type for the hash key (also called the partition key). You can * specify the following values:

  • STRING - The hash * key is a string.

  • NUMBER - The hash key is a * number.

If you don't specify hashKeyType, the * default value is STRING.

*/ inline DynamoDBAction& WithHashKeyType(const Aws::String& value) { SetHashKeyType(value); return *this;} /** *

The data type for the hash key (also called the partition key). You can * specify the following values:

  • STRING - The hash * key is a string.

  • NUMBER - The hash key is a * number.

If you don't specify hashKeyType, the * default value is STRING.

*/ inline DynamoDBAction& WithHashKeyType(Aws::String&& value) { SetHashKeyType(std::move(value)); return *this;} /** *

The data type for the hash key (also called the partition key). You can * specify the following values:

  • STRING - The hash * key is a string.

  • NUMBER - The hash key is a * number.

If you don't specify hashKeyType, the * default value is STRING.

*/ inline DynamoDBAction& WithHashKeyType(const char* value) { SetHashKeyType(value); return *this;} /** *

The name of the hash key (also called the partition key).

*/ inline const Aws::String& GetHashKeyField() const{ return m_hashKeyField; } /** *

The name of the hash key (also called the partition key).

*/ inline bool HashKeyFieldHasBeenSet() const { return m_hashKeyFieldHasBeenSet; } /** *

The name of the hash key (also called the partition key).

*/ inline void SetHashKeyField(const Aws::String& value) { m_hashKeyFieldHasBeenSet = true; m_hashKeyField = value; } /** *

The name of the hash key (also called the partition key).

*/ inline void SetHashKeyField(Aws::String&& value) { m_hashKeyFieldHasBeenSet = true; m_hashKeyField = std::move(value); } /** *

The name of the hash key (also called the partition key).

*/ inline void SetHashKeyField(const char* value) { m_hashKeyFieldHasBeenSet = true; m_hashKeyField.assign(value); } /** *

The name of the hash key (also called the partition key).

*/ inline DynamoDBAction& WithHashKeyField(const Aws::String& value) { SetHashKeyField(value); return *this;} /** *

The name of the hash key (also called the partition key).

*/ inline DynamoDBAction& WithHashKeyField(Aws::String&& value) { SetHashKeyField(std::move(value)); return *this;} /** *

The name of the hash key (also called the partition key).

*/ inline DynamoDBAction& WithHashKeyField(const char* value) { SetHashKeyField(value); return *this;} /** *

The value of the hash key (also called the partition key).

*/ inline const Aws::String& GetHashKeyValue() const{ return m_hashKeyValue; } /** *

The value of the hash key (also called the partition key).

*/ inline bool HashKeyValueHasBeenSet() const { return m_hashKeyValueHasBeenSet; } /** *

The value of the hash key (also called the partition key).

*/ inline void SetHashKeyValue(const Aws::String& value) { m_hashKeyValueHasBeenSet = true; m_hashKeyValue = value; } /** *

The value of the hash key (also called the partition key).

*/ inline void SetHashKeyValue(Aws::String&& value) { m_hashKeyValueHasBeenSet = true; m_hashKeyValue = std::move(value); } /** *

The value of the hash key (also called the partition key).

*/ inline void SetHashKeyValue(const char* value) { m_hashKeyValueHasBeenSet = true; m_hashKeyValue.assign(value); } /** *

The value of the hash key (also called the partition key).

*/ inline DynamoDBAction& WithHashKeyValue(const Aws::String& value) { SetHashKeyValue(value); return *this;} /** *

The value of the hash key (also called the partition key).

*/ inline DynamoDBAction& WithHashKeyValue(Aws::String&& value) { SetHashKeyValue(std::move(value)); return *this;} /** *

The value of the hash key (also called the partition key).

*/ inline DynamoDBAction& WithHashKeyValue(const char* value) { SetHashKeyValue(value); return *this;} /** *

The data type for the range key (also called the sort key), You can specify * the following values:

  • STRING - The range key is a * string.

  • NUMBER - The range key is number.

    *

If you don't specify rangeKeyField, the default * value is STRING.

*/ inline const Aws::String& GetRangeKeyType() const{ return m_rangeKeyType; } /** *

The data type for the range key (also called the sort key), You can specify * the following values:

  • STRING - The range key is a * string.

  • NUMBER - The range key is number.

    *

If you don't specify rangeKeyField, the default * value is STRING.

*/ inline bool RangeKeyTypeHasBeenSet() const { return m_rangeKeyTypeHasBeenSet; } /** *

The data type for the range key (also called the sort key), You can specify * the following values:

  • STRING - The range key is a * string.

  • NUMBER - The range key is number.

    *

If you don't specify rangeKeyField, the default * value is STRING.

*/ inline void SetRangeKeyType(const Aws::String& value) { m_rangeKeyTypeHasBeenSet = true; m_rangeKeyType = value; } /** *

The data type for the range key (also called the sort key), You can specify * the following values:

  • STRING - The range key is a * string.

  • NUMBER - The range key is number.

    *

If you don't specify rangeKeyField, the default * value is STRING.

*/ inline void SetRangeKeyType(Aws::String&& value) { m_rangeKeyTypeHasBeenSet = true; m_rangeKeyType = std::move(value); } /** *

The data type for the range key (also called the sort key), You can specify * the following values:

  • STRING - The range key is a * string.

  • NUMBER - The range key is number.

    *

If you don't specify rangeKeyField, the default * value is STRING.

*/ inline void SetRangeKeyType(const char* value) { m_rangeKeyTypeHasBeenSet = true; m_rangeKeyType.assign(value); } /** *

The data type for the range key (also called the sort key), You can specify * the following values:

  • STRING - The range key is a * string.

  • NUMBER - The range key is number.

    *

If you don't specify rangeKeyField, the default * value is STRING.

*/ inline DynamoDBAction& WithRangeKeyType(const Aws::String& value) { SetRangeKeyType(value); return *this;} /** *

The data type for the range key (also called the sort key), You can specify * the following values:

  • STRING - The range key is a * string.

  • NUMBER - The range key is number.

    *

If you don't specify rangeKeyField, the default * value is STRING.

*/ inline DynamoDBAction& WithRangeKeyType(Aws::String&& value) { SetRangeKeyType(std::move(value)); return *this;} /** *

The data type for the range key (also called the sort key), You can specify * the following values:

  • STRING - The range key is a * string.

  • NUMBER - The range key is number.

    *

If you don't specify rangeKeyField, the default * value is STRING.

*/ inline DynamoDBAction& WithRangeKeyType(const char* value) { SetRangeKeyType(value); return *this;} /** *

The name of the range key (also called the sort key).

*/ inline const Aws::String& GetRangeKeyField() const{ return m_rangeKeyField; } /** *

The name of the range key (also called the sort key).

*/ inline bool RangeKeyFieldHasBeenSet() const { return m_rangeKeyFieldHasBeenSet; } /** *

The name of the range key (also called the sort key).

*/ inline void SetRangeKeyField(const Aws::String& value) { m_rangeKeyFieldHasBeenSet = true; m_rangeKeyField = value; } /** *

The name of the range key (also called the sort key).

*/ inline void SetRangeKeyField(Aws::String&& value) { m_rangeKeyFieldHasBeenSet = true; m_rangeKeyField = std::move(value); } /** *

The name of the range key (also called the sort key).

*/ inline void SetRangeKeyField(const char* value) { m_rangeKeyFieldHasBeenSet = true; m_rangeKeyField.assign(value); } /** *

The name of the range key (also called the sort key).

*/ inline DynamoDBAction& WithRangeKeyField(const Aws::String& value) { SetRangeKeyField(value); return *this;} /** *

The name of the range key (also called the sort key).

*/ inline DynamoDBAction& WithRangeKeyField(Aws::String&& value) { SetRangeKeyField(std::move(value)); return *this;} /** *

The name of the range key (also called the sort key).

*/ inline DynamoDBAction& WithRangeKeyField(const char* value) { SetRangeKeyField(value); return *this;} /** *

The value of the range key (also called the sort key).

*/ inline const Aws::String& GetRangeKeyValue() const{ return m_rangeKeyValue; } /** *

The value of the range key (also called the sort key).

*/ inline bool RangeKeyValueHasBeenSet() const { return m_rangeKeyValueHasBeenSet; } /** *

The value of the range key (also called the sort key).

*/ inline void SetRangeKeyValue(const Aws::String& value) { m_rangeKeyValueHasBeenSet = true; m_rangeKeyValue = value; } /** *

The value of the range key (also called the sort key).

*/ inline void SetRangeKeyValue(Aws::String&& value) { m_rangeKeyValueHasBeenSet = true; m_rangeKeyValue = std::move(value); } /** *

The value of the range key (also called the sort key).

*/ inline void SetRangeKeyValue(const char* value) { m_rangeKeyValueHasBeenSet = true; m_rangeKeyValue.assign(value); } /** *

The value of the range key (also called the sort key).

*/ inline DynamoDBAction& WithRangeKeyValue(const Aws::String& value) { SetRangeKeyValue(value); return *this;} /** *

The value of the range key (also called the sort key).

*/ inline DynamoDBAction& WithRangeKeyValue(Aws::String&& value) { SetRangeKeyValue(std::move(value)); return *this;} /** *

The value of the range key (also called the sort key).

*/ inline DynamoDBAction& WithRangeKeyValue(const char* value) { SetRangeKeyValue(value); return *this;} /** *

The type of operation to perform. You can specify the following values:

*
  • INSERT - Insert data as a new item into the DynamoDB * table. This item uses the specified hash key as a partition key. If you * specified a range key, the item uses the range key as a sort key.

  • *

    UPDATE - Update an existing item of the DynamoDB table with new * data. This item's partition key must match the specified hash key. If you * specified a range key, the range key must match the item's sort key.

  • *
  • DELETE - Delete an existing item of the DynamoDB table. * This item's partition key must match the specified hash key. If you specified a * range key, the range key must match the item's sort key.

If * you don't specify this parameter, AWS IoT Events triggers the * INSERT operation.

*/ inline const Aws::String& GetOperation() const{ return m_operation; } /** *

The type of operation to perform. You can specify the following values:

*
  • INSERT - Insert data as a new item into the DynamoDB * table. This item uses the specified hash key as a partition key. If you * specified a range key, the item uses the range key as a sort key.

  • *

    UPDATE - Update an existing item of the DynamoDB table with new * data. This item's partition key must match the specified hash key. If you * specified a range key, the range key must match the item's sort key.

  • *
  • DELETE - Delete an existing item of the DynamoDB table. * This item's partition key must match the specified hash key. If you specified a * range key, the range key must match the item's sort key.

If * you don't specify this parameter, AWS IoT Events triggers the * INSERT operation.

*/ inline bool OperationHasBeenSet() const { return m_operationHasBeenSet; } /** *

The type of operation to perform. You can specify the following values:

*
  • INSERT - Insert data as a new item into the DynamoDB * table. This item uses the specified hash key as a partition key. If you * specified a range key, the item uses the range key as a sort key.

  • *

    UPDATE - Update an existing item of the DynamoDB table with new * data. This item's partition key must match the specified hash key. If you * specified a range key, the range key must match the item's sort key.

  • *
  • DELETE - Delete an existing item of the DynamoDB table. * This item's partition key must match the specified hash key. If you specified a * range key, the range key must match the item's sort key.

If * you don't specify this parameter, AWS IoT Events triggers the * INSERT operation.

*/ inline void SetOperation(const Aws::String& value) { m_operationHasBeenSet = true; m_operation = value; } /** *

The type of operation to perform. You can specify the following values:

*
  • INSERT - Insert data as a new item into the DynamoDB * table. This item uses the specified hash key as a partition key. If you * specified a range key, the item uses the range key as a sort key.

  • *

    UPDATE - Update an existing item of the DynamoDB table with new * data. This item's partition key must match the specified hash key. If you * specified a range key, the range key must match the item's sort key.

  • *
  • DELETE - Delete an existing item of the DynamoDB table. * This item's partition key must match the specified hash key. If you specified a * range key, the range key must match the item's sort key.

If * you don't specify this parameter, AWS IoT Events triggers the * INSERT operation.

*/ inline void SetOperation(Aws::String&& value) { m_operationHasBeenSet = true; m_operation = std::move(value); } /** *

The type of operation to perform. You can specify the following values:

*
  • INSERT - Insert data as a new item into the DynamoDB * table. This item uses the specified hash key as a partition key. If you * specified a range key, the item uses the range key as a sort key.

  • *

    UPDATE - Update an existing item of the DynamoDB table with new * data. This item's partition key must match the specified hash key. If you * specified a range key, the range key must match the item's sort key.

  • *
  • DELETE - Delete an existing item of the DynamoDB table. * This item's partition key must match the specified hash key. If you specified a * range key, the range key must match the item's sort key.

If * you don't specify this parameter, AWS IoT Events triggers the * INSERT operation.

*/ inline void SetOperation(const char* value) { m_operationHasBeenSet = true; m_operation.assign(value); } /** *

The type of operation to perform. You can specify the following values:

*
  • INSERT - Insert data as a new item into the DynamoDB * table. This item uses the specified hash key as a partition key. If you * specified a range key, the item uses the range key as a sort key.

  • *

    UPDATE - Update an existing item of the DynamoDB table with new * data. This item's partition key must match the specified hash key. If you * specified a range key, the range key must match the item's sort key.

  • *
  • DELETE - Delete an existing item of the DynamoDB table. * This item's partition key must match the specified hash key. If you specified a * range key, the range key must match the item's sort key.

If * you don't specify this parameter, AWS IoT Events triggers the * INSERT operation.

*/ inline DynamoDBAction& WithOperation(const Aws::String& value) { SetOperation(value); return *this;} /** *

The type of operation to perform. You can specify the following values:

*
  • INSERT - Insert data as a new item into the DynamoDB * table. This item uses the specified hash key as a partition key. If you * specified a range key, the item uses the range key as a sort key.

  • *

    UPDATE - Update an existing item of the DynamoDB table with new * data. This item's partition key must match the specified hash key. If you * specified a range key, the range key must match the item's sort key.

  • *
  • DELETE - Delete an existing item of the DynamoDB table. * This item's partition key must match the specified hash key. If you specified a * range key, the range key must match the item's sort key.

If * you don't specify this parameter, AWS IoT Events triggers the * INSERT operation.

*/ inline DynamoDBAction& WithOperation(Aws::String&& value) { SetOperation(std::move(value)); return *this;} /** *

The type of operation to perform. You can specify the following values:

*
  • INSERT - Insert data as a new item into the DynamoDB * table. This item uses the specified hash key as a partition key. If you * specified a range key, the item uses the range key as a sort key.

  • *

    UPDATE - Update an existing item of the DynamoDB table with new * data. This item's partition key must match the specified hash key. If you * specified a range key, the range key must match the item's sort key.

  • *
  • DELETE - Delete an existing item of the DynamoDB table. * This item's partition key must match the specified hash key. If you specified a * range key, the range key must match the item's sort key.

If * you don't specify this parameter, AWS IoT Events triggers the * INSERT operation.

*/ inline DynamoDBAction& WithOperation(const char* value) { SetOperation(value); return *this;} /** *

The name of the DynamoDB column that receives the action payload.

If * you don't specify this parameter, the name of the DynamoDB column is * payload.

*/ inline const Aws::String& GetPayloadField() const{ return m_payloadField; } /** *

The name of the DynamoDB column that receives the action payload.

If * you don't specify this parameter, the name of the DynamoDB column is * payload.

*/ inline bool PayloadFieldHasBeenSet() const { return m_payloadFieldHasBeenSet; } /** *

The name of the DynamoDB column that receives the action payload.

If * you don't specify this parameter, the name of the DynamoDB column is * payload.

*/ inline void SetPayloadField(const Aws::String& value) { m_payloadFieldHasBeenSet = true; m_payloadField = value; } /** *

The name of the DynamoDB column that receives the action payload.

If * you don't specify this parameter, the name of the DynamoDB column is * payload.

*/ inline void SetPayloadField(Aws::String&& value) { m_payloadFieldHasBeenSet = true; m_payloadField = std::move(value); } /** *

The name of the DynamoDB column that receives the action payload.

If * you don't specify this parameter, the name of the DynamoDB column is * payload.

*/ inline void SetPayloadField(const char* value) { m_payloadFieldHasBeenSet = true; m_payloadField.assign(value); } /** *

The name of the DynamoDB column that receives the action payload.

If * you don't specify this parameter, the name of the DynamoDB column is * payload.

*/ inline DynamoDBAction& WithPayloadField(const Aws::String& value) { SetPayloadField(value); return *this;} /** *

The name of the DynamoDB column that receives the action payload.

If * you don't specify this parameter, the name of the DynamoDB column is * payload.

*/ inline DynamoDBAction& WithPayloadField(Aws::String&& value) { SetPayloadField(std::move(value)); return *this;} /** *

The name of the DynamoDB column that receives the action payload.

If * you don't specify this parameter, the name of the DynamoDB column is * payload.

*/ inline DynamoDBAction& WithPayloadField(const char* value) { SetPayloadField(value); return *this;} /** *

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 DynamoDBAction& WithTableName(const Aws::String& value) { SetTableName(value); return *this;} /** *

The name of the DynamoDB table.

*/ inline DynamoDBAction& WithTableName(Aws::String&& value) { SetTableName(std::move(value)); return *this;} /** *

The name of the DynamoDB table.

*/ inline DynamoDBAction& 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 DynamoDBAction& WithPayload(const Payload& value) { SetPayload(value); return *this;} inline DynamoDBAction& WithPayload(Payload&& value) { SetPayload(std::move(value)); return *this;} private: Aws::String m_hashKeyType; bool m_hashKeyTypeHasBeenSet; Aws::String m_hashKeyField; bool m_hashKeyFieldHasBeenSet; Aws::String m_hashKeyValue; bool m_hashKeyValueHasBeenSet; Aws::String m_rangeKeyType; bool m_rangeKeyTypeHasBeenSet; Aws::String m_rangeKeyField; bool m_rangeKeyFieldHasBeenSet; Aws::String m_rangeKeyValue; bool m_rangeKeyValueHasBeenSet; Aws::String m_operation; bool m_operationHasBeenSet; Aws::String m_payloadField; bool m_payloadFieldHasBeenSet; Aws::String m_tableName; bool m_tableNameHasBeenSet; Payload m_payload; bool m_payloadHasBeenSet; }; } // namespace Model } // namespace IoTEvents } // namespace Aws