Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GetItemCommand

The GetItem operation returns a set of attributes for the item with the given primary key. If there is no matching item, GetItem does not return any data and there will be no Item element in the response.

GetItem provides an eventually consistent read by default. If your application requires a strongly consistent read, set ConsistentRead to true. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value.

example

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

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

GetItemCommandInput for command's input shape.

see

GetItemCommandOutput for command's response shape.

see

config for DynamoDBClient's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

  • Parameters

    Returns GetItemCommand

  • Parameters

    • input: GetItemCommandInput

    Returns GetItemCommand

Properties

Readonly input

input: GetItemCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<GetItemCommandInput, GetItemCommandOutput>