@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class DynamoDBAction extends Object implements Serializable, Cloneable, StructuredPojo
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.
| Constructor and Description |
|---|
DynamoDBAction() |
| Modifier and Type | Method and Description |
|---|---|
DynamoDBAction |
clone() |
boolean |
equals(Object obj) |
String |
getHashKeyField()
The name of the hash key (also called the partition key).
|
String |
getHashKeyType()
The data type for the hash key (also called the partition key).
|
String |
getHashKeyValue()
The value of the hash key (also called the partition key).
|
String |
getOperation()
The type of operation to perform.
|
Payload |
getPayload() |
String |
getPayloadField()
The name of the DynamoDB column that receives the action payload.
|
String |
getRangeKeyField()
The name of the range key (also called the sort key).
|
String |
getRangeKeyType()
The data type for the range key (also called the sort key), You can specify the following values:
|
String |
getRangeKeyValue()
The value of the range key (also called the sort key).
|
String |
getTableName()
The name of the DynamoDB table.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller) |
void |
setHashKeyField(String hashKeyField)
The name of the hash key (also called the partition key).
|
void |
setHashKeyType(String hashKeyType)
The data type for the hash key (also called the partition key).
|
void |
setHashKeyValue(String hashKeyValue)
The value of the hash key (also called the partition key).
|
void |
setOperation(String operation)
The type of operation to perform.
|
void |
setPayload(Payload payload) |
void |
setPayloadField(String payloadField)
The name of the DynamoDB column that receives the action payload.
|
void |
setRangeKeyField(String rangeKeyField)
The name of the range key (also called the sort key).
|
void |
setRangeKeyType(String rangeKeyType)
The data type for the range key (also called the sort key), You can specify the following values:
|
void |
setRangeKeyValue(String rangeKeyValue)
The value of the range key (also called the sort key).
|
void |
setTableName(String tableName)
The name of the DynamoDB table.
|
String |
toString()
Returns a string representation of this object.
|
DynamoDBAction |
withHashKeyField(String hashKeyField)
The name of the hash key (also called the partition key).
|
DynamoDBAction |
withHashKeyType(String hashKeyType)
The data type for the hash key (also called the partition key).
|
DynamoDBAction |
withHashKeyValue(String hashKeyValue)
The value of the hash key (also called the partition key).
|
DynamoDBAction |
withOperation(String operation)
The type of operation to perform.
|
DynamoDBAction |
withPayload(Payload payload) |
DynamoDBAction |
withPayloadField(String payloadField)
The name of the DynamoDB column that receives the action payload.
|
DynamoDBAction |
withRangeKeyField(String rangeKeyField)
The name of the range key (also called the sort key).
|
DynamoDBAction |
withRangeKeyType(String rangeKeyType)
The data type for the range key (also called the sort key), You can specify the following values:
|
DynamoDBAction |
withRangeKeyValue(String rangeKeyValue)
The value of the range key (also called the sort key).
|
DynamoDBAction |
withTableName(String tableName)
The name of the DynamoDB table.
|
public void setHashKeyType(String 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.
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.
public String getHashKeyType()
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.
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.
public DynamoDBAction withHashKeyType(String 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.
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.
public void setHashKeyField(String hashKeyField)
The name of the hash key (also called the partition key).
hashKeyField - The name of the hash key (also called the partition key).public String getHashKeyField()
The name of the hash key (also called the partition key).
public DynamoDBAction withHashKeyField(String hashKeyField)
The name of the hash key (also called the partition key).
hashKeyField - The name of the hash key (also called the partition key).public void setHashKeyValue(String hashKeyValue)
The value of the hash key (also called the partition key).
hashKeyValue - The value of the hash key (also called the partition key).public String getHashKeyValue()
The value of the hash key (also called the partition key).
public DynamoDBAction withHashKeyValue(String hashKeyValue)
The value of the hash key (also called the partition key).
hashKeyValue - The value of the hash key (also called the partition key).public void setRangeKeyType(String 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.
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.
public String getRangeKeyType()
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.
STRING - The range key is a string.
NUMBER - The range key is number.
If you don't specify rangeKeyField, the default value is STRING.
public DynamoDBAction withRangeKeyType(String 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.
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.
public void setRangeKeyField(String rangeKeyField)
The name of the range key (also called the sort key).
rangeKeyField - The name of the range key (also called the sort key).public String getRangeKeyField()
The name of the range key (also called the sort key).
public DynamoDBAction withRangeKeyField(String rangeKeyField)
The name of the range key (also called the sort key).
rangeKeyField - The name of the range key (also called the sort key).public void setRangeKeyValue(String rangeKeyValue)
The value of the range key (also called the sort key).
rangeKeyValue - The value of the range key (also called the sort key).public String getRangeKeyValue()
The value of the range key (also called the sort key).
public DynamoDBAction withRangeKeyValue(String rangeKeyValue)
The value of the range key (also called the sort key).
rangeKeyValue - The value of the range key (also called the sort key).public void setOperation(String 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.
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.
public String getOperation()
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.
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.
public DynamoDBAction withOperation(String 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.
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.
public void setPayloadField(String 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.
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.
public String getPayloadField()
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.
If you don't specify this parameter, the name of the DynamoDB column is payload.
public DynamoDBAction withPayloadField(String 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.
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.
public void setTableName(String tableName)
The name of the DynamoDB table.
tableName - The name of the DynamoDB table.public String getTableName()
The name of the DynamoDB table.
public DynamoDBAction withTableName(String tableName)
The name of the DynamoDB table.
tableName - The name of the DynamoDB table.public void setPayload(Payload payload)
payload - public Payload getPayload()
public DynamoDBAction withPayload(Payload payload)
payload - public String toString()
toString in class ObjectObject.toString()public DynamoDBAction clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
marshall in interface StructuredPojoCopyright © 2021. All rights reserved.