Class DynamoDBAction

java.lang.Object
software.amazon.awssdk.services.iot.model.DynamoDBAction
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<DynamoDBAction.Builder,DynamoDBAction>

@Generated("software.amazon.awssdk:codegen") public final class DynamoDBAction extends Object implements SdkPojo, Serializable, ToCopyableBuilder<DynamoDBAction.Builder,DynamoDBAction>

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:
  • Method Details

    • tableName

      public final String tableName()

      The name of the DynamoDB table.

      Returns:
      The name of the DynamoDB table.
    • roleArn

      public final String roleArn()

      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.
    • operation

      public final String operation()

      The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.

      Returns:
      The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.
    • hashKeyField

      public final String hashKeyField()

      The hash key name.

      Returns:
      The hash key name.
    • hashKeyValue

      public final String hashKeyValue()

      The hash key value.

      Returns:
      The hash key value.
    • hashKeyType

      public final DynamoKeyType hashKeyType()

      The hash key type. Valid values are "STRING" or "NUMBER"

      If the service returns an enum value that is not available in the current SDK version, hashKeyType will return DynamoKeyType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from hashKeyTypeAsString().

      Returns:
      The hash key type. Valid values are "STRING" or "NUMBER"
      See Also:
    • hashKeyTypeAsString

      public final String hashKeyTypeAsString()

      The hash key type. Valid values are "STRING" or "NUMBER"

      If the service returns an enum value that is not available in the current SDK version, hashKeyType will return DynamoKeyType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from hashKeyTypeAsString().

      Returns:
      The hash key type. Valid values are "STRING" or "NUMBER"
      See Also:
    • rangeKeyField

      public final String rangeKeyField()

      The range key name.

      Returns:
      The range key name.
    • rangeKeyValue

      public final String rangeKeyValue()

      The range key value.

      Returns:
      The range key value.
    • rangeKeyType

      public final DynamoKeyType rangeKeyType()

      The range key type. Valid values are "STRING" or "NUMBER"

      If the service returns an enum value that is not available in the current SDK version, rangeKeyType will return DynamoKeyType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from rangeKeyTypeAsString().

      Returns:
      The range key type. Valid values are "STRING" or "NUMBER"
      See Also:
    • rangeKeyTypeAsString

      public final String rangeKeyTypeAsString()

      The range key type. Valid values are "STRING" or "NUMBER"

      If the service returns an enum value that is not available in the current SDK version, rangeKeyType will return DynamoKeyType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from rangeKeyTypeAsString().

      Returns:
      The range key type. Valid values are "STRING" or "NUMBER"
      See Also:
    • payloadField

      public final String payloadField()

      The action payload. This name can be customized.

      Returns:
      The action payload. This name can be customized.
    • toBuilder

      public DynamoDBAction.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<DynamoDBAction.Builder,DynamoDBAction>
      Returns:
      a builder for type T
    • builder

      public static DynamoDBAction.Builder builder()
    • serializableBuilderClass

      public static Class<? extends DynamoDBAction.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

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

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.