Class DynamoDBAction
- All Implemented Interfaces:
Serializable
,SdkPojo
,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:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic DynamoDBAction.Builder
builder()
final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
final String
The hash key name.final DynamoKeyType
The hash key type.final String
The hash key type.final String
The hash key value.final String
The type of operation to be performed.final String
The action payload.final String
The range key name.final DynamoKeyType
The range key type.final String
The range key type.final String
The range key value.final String
roleArn()
The ARN of the IAM role that grants access to the DynamoDB table.static Class
<? extends DynamoDBAction.Builder> final String
The name of the DynamoDB table.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
tableName
The name of the DynamoDB table.
- Returns:
- The name of the DynamoDB table.
-
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
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
, orDELETE
.- 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
, orDELETE
.
-
hashKeyField
-
hashKeyValue
-
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 returnDynamoKeyType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromhashKeyTypeAsString()
.- Returns:
- The hash key type. Valid values are "STRING" or "NUMBER"
- See Also:
-
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 returnDynamoKeyType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromhashKeyTypeAsString()
.- Returns:
- The hash key type. Valid values are "STRING" or "NUMBER"
- See Also:
-
rangeKeyField
-
rangeKeyValue
-
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 returnDynamoKeyType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromrangeKeyTypeAsString()
.- Returns:
- The range key type. Valid values are "STRING" or "NUMBER"
- See Also:
-
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 returnDynamoKeyType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromrangeKeyTypeAsString()
.- Returns:
- The range key type. Valid values are "STRING" or "NUMBER"
- See Also:
-
payloadField
The action payload. This name can be customized.
- Returns:
- The action payload. This name can be customized.
-
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 interfaceToCopyableBuilder<DynamoDBAction.Builder,
DynamoDBAction> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
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 anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-