ExpectedAttributeValue

Represents a condition to be compared with an attribute value. This condition can be used with DeleteItem, PutItem, or UpdateItem operations; if the comparison evaluates to true, the operation succeeds; if not, the operation fails. You can use ExpectedAttributeValue in one of two different ways:

  • Use AttributeValueList to specify one or more values to compare against an attribute. Use ComparisonOperator to specify how you want to perform the comparison. If the comparison evaluates to true, then the conditional operation succeeds.

  • Use Value to specify a value that DynamoDB will compare against an attribute. If the values match, then ExpectedAttributeValue evaluates to true and the conditional operation succeeds. Optionally, you can also set Exists to false, indicating that you do not expect to find the attribute value in the table. In this case, the conditional operation succeeds only if the comparison evaluates to false.

Value and Exists are incompatible with AttributeValueList and ComparisonOperator. Note that if you use both sets of parameters at once, DynamoDB will return a ValidationException exception.

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Properties

Link copied to clipboard

One or more values to evaluate against the supplied attribute. The number of values in the list depends on the ComparisonOperator being used.

Link copied to clipboard

A comparator for evaluating attributes in the AttributeValueList. For example, equals, greater than, less than, etc.

Link copied to clipboard

Causes DynamoDB to evaluate the value before attempting a conditional operation:

Link copied to clipboard

Represents the data for the expected attribute.

Functions

Link copied to clipboard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String