UNPKG

@aws-sdk/client-s3

Version:

AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native

90 lines 4.21 kB
import { __extends } from "tslib"; import { ListObjectsOutput, ListObjectsRequest } from "../models/models_0"; import { deserializeAws_restXmlListObjectsCommand, serializeAws_restXmlListObjectsCommand, } from "../protocols/Aws_restXml"; import { getBucketEndpointPlugin } from "@aws-sdk/middleware-bucket-endpoint"; import { getSerdePlugin } from "@aws-sdk/middleware-serde"; import { Command as $Command } from "@aws-sdk/smithy-client"; /** * <p>Returns some or all (up to 1,000) of the objects in a bucket. You can use the request * parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK * response can contain valid or invalid XML. Be sure to design your application to parse the * contents of the response and handle it appropriately.</p> * <important> * <p>This API has been revised. We recommend that you use the newer version, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html">ListObjectsV2</a>, when developing applications. For backward compatibility, * Amazon S3 continues to support <code>ListObjects</code>.</p> * </important> * * * <p>The following operations are related to <code>ListObjects</code>:</p> * <ul> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html">ListObjectsV2</a> * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a> * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a> * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html">CreateBucket</a> * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a> * </p> * </li> * </ul> */ var ListObjectsCommand = /** @class */ (function (_super) { __extends(ListObjectsCommand, _super); // Start section: command_properties // End section: command_properties function ListObjectsCommand(input) { var _this = // Start section: command_constructor _super.call(this) || this; _this.input = input; return _this; // End section: command_constructor } /** * @internal */ ListObjectsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) { this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); this.middlewareStack.use(getBucketEndpointPlugin(configuration)); var stack = clientStack.concat(this.middlewareStack); var logger = configuration.logger; var clientName = "S3Client"; var commandName = "ListObjectsCommand"; var handlerExecutionContext = { logger: logger, clientName: clientName, commandName: commandName, inputFilterSensitiveLog: ListObjectsRequest.filterSensitiveLog, outputFilterSensitiveLog: ListObjectsOutput.filterSensitiveLog, }; var requestHandler = configuration.requestHandler; return stack.resolve(function (request) { return requestHandler.handle(request.request, options || {}); }, handlerExecutionContext); }; ListObjectsCommand.prototype.serialize = function (input, context) { return serializeAws_restXmlListObjectsCommand(input, context); }; ListObjectsCommand.prototype.deserialize = function (output, context) { return deserializeAws_restXmlListObjectsCommand(output, context); }; return ListObjectsCommand; }($Command)); export { ListObjectsCommand }; //# sourceMappingURL=ListObjectsCommand.js.map