List the objects contained in a bucket.

Example

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

import { BucketsClient, ListObjectsCommand } from "@stedi/sdk-client-buckets"; // ES Modules import
// const { BucketsClient, ListObjectsCommand } = require("@stedi/sdk-client-buckets"); // CommonJS import
const client = new BucketsClient(config);
const input = { // ListObjectsInput
pageSize: Number("int"),
pageToken: "STRING_VALUE",
bucketName: "STRING_VALUE", // required
prefix: "STRING_VALUE",
delimiter: "STRING_VALUE",
};
const command = new ListObjectsCommand(input);
const response = await client.send(command);
// { // ListObjectsOutput
// nextPageToken: "STRING_VALUE",
// items: [ // ObjectList
// { // ObjectListOutput
// key: "STRING_VALUE", // required
// updatedAt: new Date("TIMESTAMP"), // required
// size: Number("int"), // required
// },
// ],
// commonPrefixes: [ // PrefixList
// { // PrefixListOutput
// prefix: "STRING_VALUE", // required
// },
// ],
// };

Param

ListObjectsCommandInput

Returns

ListObjectsCommandOutput

See

Throws

NoSuchBucketException (client fault)

Throws

NoSuchKeyException (client fault)

Throws

AccessDeniedException (client fault)

Throws

ProductUnavailableException (client fault)

Throws

ResourceAlreadyExistsException (client fault)

Throws

ResourceNotFoundException (client fault)

Throws

ResourceUnderChangeException (client fault)

Throws

ServiceException (server fault)

Throws

BucketsServiceException

Base exception class for all service exceptions from Buckets service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Returns EndpointParameterInstructions