UNPKG

@aws-sdk/client-s3

Version:

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

91 lines 4.75 kB
import { __extends } from "tslib"; import { AbortMultipartUploadOutput, AbortMultipartUploadRequest } from "../models/models_0"; import { deserializeAws_restXmlAbortMultipartUploadCommand, serializeAws_restXmlAbortMultipartUploadCommand, } 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>This operation aborts a multipart upload. After a multipart upload is aborted, no * additional parts can be uploaded using that upload ID. The storage consumed by any * previously uploaded parts will be freed. However, if any part uploads are currently in * progress, those part uploads might or might not succeed. As a result, it might be necessary * to abort a given multipart upload multiple times in order to completely free all storage * consumed by all parts. </p> * <p>To verify that all parts have been removed, so you don't get charged for the part * storage, you should call the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> operation and ensure that * the parts list is empty.</p> * <p>For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload API and * Permissions</a>.</p> * <p>The following operations are related to <code>AbortMultipartUpload</code>:</p> * <ul> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a> * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a> * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a> * </p> * </li> * <li> * <p> * <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> * </p> * </li> * </ul> */ var AbortMultipartUploadCommand = /** @class */ (function (_super) { __extends(AbortMultipartUploadCommand, _super); // Start section: command_properties // End section: command_properties function AbortMultipartUploadCommand(input) { var _this = // Start section: command_constructor _super.call(this) || this; _this.input = input; return _this; // End section: command_constructor } /** * @internal */ AbortMultipartUploadCommand.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 = "AbortMultipartUploadCommand"; var handlerExecutionContext = { logger: logger, clientName: clientName, commandName: commandName, inputFilterSensitiveLog: AbortMultipartUploadRequest.filterSensitiveLog, outputFilterSensitiveLog: AbortMultipartUploadOutput.filterSensitiveLog, }; var requestHandler = configuration.requestHandler; return stack.resolve(function (request) { return requestHandler.handle(request.request, options || {}); }, handlerExecutionContext); }; AbortMultipartUploadCommand.prototype.serialize = function (input, context) { return serializeAws_restXmlAbortMultipartUploadCommand(input, context); }; AbortMultipartUploadCommand.prototype.deserialize = function (output, context) { return deserializeAws_restXmlAbortMultipartUploadCommand(output, context); }; return AbortMultipartUploadCommand; }($Command)); export { AbortMultipartUploadCommand }; //# sourceMappingURL=AbortMultipartUploadCommand.js.map