Class DynamoDBAction
- java.lang.Object
-
- com.amazonaws.services.iot.model.DynamoDBAction
-
- All Implemented Interfaces:
Serializable,Cloneable
public class DynamoDBAction extends Object implements Serializable, Cloneable
Describes an action to write to a DynamoDB table.
The
tableName,hashKeyField, andrangeKeyFieldvalues must match the values used when you created the table.The
hashKeyValueandrangeKeyvaluefields use a substitution template syntax. These templates provide data at runtime. The syntax is as follows: ${sql-expression}.You can specify any valid expression in a WHERE or SELECT clause, including JSON properties, comparisons, calculations, and functions. For example, the following field uses the third level of the topic:
"hashKeyValue": "${topic(3)}"The following field uses the timestamp:
"rangeKeyValue": "${timestamp()}"- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DynamoDBAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamoDBActionclone()booleanequals(Object obj)StringgetHashKeyField()The hash key name.StringgetHashKeyValue()The hash key value.StringgetPayloadField()The action payload.StringgetRangeKeyField()The range key name.StringgetRangeKeyValue()The range key value.StringgetRoleArn()The ARN of the IAM role that grants access to the DynamoDB table.StringgetTableName()The name of the DynamoDB table.inthashCode()voidsetHashKeyField(String hashKeyField)The hash key name.voidsetHashKeyValue(String hashKeyValue)The hash key value.voidsetPayloadField(String payloadField)The action payload.voidsetRangeKeyField(String rangeKeyField)The range key name.voidsetRangeKeyValue(String rangeKeyValue)The range key value.voidsetRoleArn(String roleArn)The ARN of the IAM role that grants access to the DynamoDB table.voidsetTableName(String tableName)The name of the DynamoDB table.StringtoString()Returns a string representation of this object; useful for testing and debugging.DynamoDBActionwithHashKeyField(String hashKeyField)The hash key name.DynamoDBActionwithHashKeyValue(String hashKeyValue)The hash key value.DynamoDBActionwithPayloadField(String payloadField)The action payload.DynamoDBActionwithRangeKeyField(String rangeKeyField)The range key name.DynamoDBActionwithRangeKeyValue(String rangeKeyValue)The range key value.DynamoDBActionwithRoleArn(String roleArn)The ARN of the IAM role that grants access to the DynamoDB table.DynamoDBActionwithTableName(String tableName)The name of the DynamoDB table.
-
-
-
Method Detail
-
setTableName
public void setTableName(String tableName)
The name of the DynamoDB table.
- Parameters:
tableName- The name of the DynamoDB table.
-
getTableName
public String getTableName()
The name of the DynamoDB table.
- Returns:
- The name of the DynamoDB table.
-
withTableName
public DynamoDBAction withTableName(String tableName)
The name of the DynamoDB table.
- Parameters:
tableName- The name of the DynamoDB table.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRoleArn
public void setRoleArn(String roleArn)
The ARN of the IAM role that grants access to the DynamoDB table.
- Parameters:
roleArn- The ARN of the IAM role that grants access to the DynamoDB table.
-
getRoleArn
public String getRoleArn()
The ARN of the IAM role that grants access to the DynamoDB table.
- Returns:
- The ARN of the IAM role that grants access to the DynamoDB table.
-
withRoleArn
public DynamoDBAction withRoleArn(String roleArn)
The ARN of the IAM role that grants access to the DynamoDB table.
- Parameters:
roleArn- The ARN of the IAM role that grants access to the DynamoDB table.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setHashKeyField
public void setHashKeyField(String hashKeyField)
The hash key name.
- Parameters:
hashKeyField- The hash key name.
-
getHashKeyField
public String getHashKeyField()
The hash key name.
- Returns:
- The hash key name.
-
withHashKeyField
public DynamoDBAction withHashKeyField(String hashKeyField)
The hash key name.
- Parameters:
hashKeyField- The hash key name.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setHashKeyValue
public void setHashKeyValue(String hashKeyValue)
The hash key value.
- Parameters:
hashKeyValue- The hash key value.
-
getHashKeyValue
public String getHashKeyValue()
The hash key value.
- Returns:
- The hash key value.
-
withHashKeyValue
public DynamoDBAction withHashKeyValue(String hashKeyValue)
The hash key value.
- Parameters:
hashKeyValue- The hash key value.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRangeKeyField
public void setRangeKeyField(String rangeKeyField)
The range key name.
- Parameters:
rangeKeyField- The range key name.
-
getRangeKeyField
public String getRangeKeyField()
The range key name.
- Returns:
- The range key name.
-
withRangeKeyField
public DynamoDBAction withRangeKeyField(String rangeKeyField)
The range key name.
- Parameters:
rangeKeyField- The range key name.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRangeKeyValue
public void setRangeKeyValue(String rangeKeyValue)
The range key value.
- Parameters:
rangeKeyValue- The range key value.
-
getRangeKeyValue
public String getRangeKeyValue()
The range key value.
- Returns:
- The range key value.
-
withRangeKeyValue
public DynamoDBAction withRangeKeyValue(String rangeKeyValue)
The range key value.
- Parameters:
rangeKeyValue- The range key value.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPayloadField
public void setPayloadField(String payloadField)
The action payload. This name can be customized.
- Parameters:
payloadField- The action payload. This name can be customized.
-
getPayloadField
public String getPayloadField()
The action payload. This name can be customized.
- Returns:
- The action payload. This name can be customized.
-
withPayloadField
public DynamoDBAction withPayloadField(String payloadField)
The action payload. This name can be customized.
- Parameters:
payloadField- The action payload. This name can be customized.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public DynamoDBAction clone()
-
-