Skip to content

Update

Source code in docs_src/capo_dynamodb/types/update.py
class Update(TypedDict, closed=True):
    key: "capo_dynamodb.types.key.Key"
    """<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>"""
    update_expression: "capo_dynamodb.types.update_expression.UpdateExpression"
    """<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>"""
    table_name: "capo_dynamodb.types.table_arn.TableArn"
    """<p>Name of the table for the <code>UpdateItem</code> request. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>"""
    condition_expression: NotRequired[
        "capo_dynamodb.types.condition_expression.ConditionExpression"
    ]
    """<p>A condition that must be satisfied in order for a conditional update to succeed.</p>"""
    expression_attribute_names: NotRequired[
        "capo_dynamodb.types.expression_attribute_name_map.ExpressionAttributeNameMap"
    ]
    """<p>One or more substitution tokens for attribute names in an expression.</p>"""
    expression_attribute_values: NotRequired[
        "capo_dynamodb.types.expression_attribute_value_map.ExpressionAttributeValueMap"
    ]
    """<p>One or more values that can be substituted in an expression.</p>"""
    return_values_on_condition_check_failure: NotRequired[
        "capo_dynamodb.types.return_values_on_condition_check_failure.ReturnValuesOnConditionCheckFailure"
    ]
    """<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE and ALL_OLD.</p>"""

condition_expression instance-attribute

condition_expression: NotRequired[ConditionExpression]

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

expression_attribute_names instance-attribute

expression_attribute_names: NotRequired[ExpressionAttributeNameMap]

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

expression_attribute_values instance-attribute

expression_attribute_values: NotRequired[ExpressionAttributeValueMap]

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

key instance-attribute

key: Key

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 instance-attribute

return_values_on_condition_check_failure: NotRequired[
    ReturnValuesOnConditionCheckFailure
]

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: TableArn

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: UpdateExpression

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