update_item
Modify specific attributes of an item in a DynamoDB table using defined update expressions, attribute mappings, and values, with optional conditions and return options.
Instructions
Updates specific attributes of an item in a table
Input Schema
Name | Required | Description | Default |
---|---|---|---|
conditionExpression | No | Condition for update (optional) | |
expressionAttributeNames | Yes | Attribute name mappings | |
expressionAttributeValues | Yes | Values for the update expression | |
key | Yes | Primary key of the item to update | |
returnValues | No | What values to return | |
tableName | Yes | Name of the table | |
updateExpression | Yes | Update expression (e.g., 'SET #n = :name') |
Input Schema (JSON Schema)
{
"properties": {
"conditionExpression": {
"description": "Condition for update (optional)",
"type": "string"
},
"expressionAttributeNames": {
"description": "Attribute name mappings",
"type": "object"
},
"expressionAttributeValues": {
"description": "Values for the update expression",
"type": "object"
},
"key": {
"description": "Primary key of the item to update",
"type": "object"
},
"returnValues": {
"description": "What values to return",
"enum": [
"NONE",
"ALL_OLD",
"UPDATED_OLD",
"ALL_NEW",
"UPDATED_NEW"
],
"type": "string"
},
"tableName": {
"description": "Name of the table",
"type": "string"
},
"updateExpression": {
"description": "Update expression (e.g., 'SET #n = :name')",
"type": "string"
}
},
"required": [
"tableName",
"key",
"updateExpression",
"expressionAttributeNames",
"expressionAttributeValues"
],
"type": "object"
}