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
, andrangeKeyField
values must match the values used when you created the table.The
hashKeyValue
andrangeKeyvalue
fields 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 DynamoDBAction
clone()
boolean
equals(Object obj)
String
getHashKeyField()
The hash key name.String
getHashKeyValue()
The hash key value.String
getPayloadField()
The action payload.String
getRangeKeyField()
The range key name.String
getRangeKeyValue()
The range key value.String
getRoleArn()
The ARN of the IAM role that grants access to the DynamoDB table.String
getTableName()
The name of the DynamoDB table.int
hashCode()
void
setHashKeyField(String hashKeyField)
The hash key name.void
setHashKeyValue(String hashKeyValue)
The hash key value.void
setPayloadField(String payloadField)
The action payload.void
setRangeKeyField(String rangeKeyField)
The range key name.void
setRangeKeyValue(String rangeKeyValue)
The range key value.void
setRoleArn(String roleArn)
The ARN of the IAM role that grants access to the DynamoDB table.void
setTableName(String tableName)
The name of the DynamoDB table.String
toString()
Returns a string representation of this object; useful for testing and debugging.DynamoDBAction
withHashKeyField(String hashKeyField)
The hash key name.DynamoDBAction
withHashKeyValue(String hashKeyValue)
The hash key value.DynamoDBAction
withPayloadField(String payloadField)
The action payload.DynamoDBAction
withRangeKeyField(String rangeKeyField)
The range key name.DynamoDBAction
withRangeKeyValue(String rangeKeyValue)
The range key value.DynamoDBAction
withRoleArn(String roleArn)
The ARN of the IAM role that grants access to the DynamoDB table.DynamoDBAction
withTableName(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:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public DynamoDBAction clone()
-
-