Skip to content

DynamoDB  >  Structures  >  Update

Update

Structure Class

Update dataclass

Represents a request to perform an UpdateItem operation.

Attributes

condition_expression class-attribute instance-attribute
condition_expression: str | None = None

A condition that must be satisfied in order for a conditional update to succeed.

expression_attribute_names class-attribute instance-attribute
expression_attribute_names: dict[str, str] | None = None

One or more substitution tokens for attribute names in an expression.

expression_attribute_values class-attribute instance-attribute
expression_attribute_values: dict[str, AttributeValue] | None = None

One or more values that can be substituted in an expression.

key instance-attribute

The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.

return_values_on_condition_check_failure class-attribute instance-attribute
return_values_on_condition_check_failure: ReturnValuesOnConditionCheckFailure | None = None

Use ReturnValuesOnConditionCheckFailure to get the item attributes if the Update condition fails. For ReturnValuesOnConditionCheckFailure, the valid values are: NONE and ALL_OLD.

table_name instance-attribute
table_name: str

Name of the table for the UpdateItem request. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

update_expression instance-attribute
update_expression: str

An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.