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, and rangeKeyField values must match the values used when you created the table.

The hashKeyValue and rangeKeyvalue 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:
  • Constructor Details

    • DynamoDBAction

      public DynamoDBAction()
  • Method Details

    • 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 class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public DynamoDBAction clone()
      Overrides:
      clone in class Object