Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UpdateItemCommand

Edits an existing item's attributes, or adds a new item to the table if it does not already exist. You can put, delete, or add attribute values. You can also perform a conditional update on an existing item (insert a new attribute name-value pair if it doesn't exist, or replace an existing name-value pair if it has certain expected attribute values).

You can also return the item's attribute values in the same UpdateItem operation using the ReturnValues parameter.

example

Use a bare-bones client and the command you need to make an API call.

import { DynamoDBClient, UpdateItemCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
// const { DynamoDBClient, UpdateItemCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
const client = new DynamoDBClient(config);
const command = new UpdateItemCommand(input);
const response = await client.send(command);
see

UpdateItemCommandInput for command's input shape.

see

UpdateItemCommandOutput for command's response shape.

see

config for DynamoDBClient's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: UpdateItemCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<UpdateItemCommandInput, UpdateItemCommandOutput>