import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { ListMultipartUploadsOutput, ListMultipartUploadsRequest } from "../models/models_0"; import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link ListMultipartUploadsCommand}. */ export interface ListMultipartUploadsCommandInput extends ListMultipartUploadsRequest { } /** * @public * * The output of {@link ListMultipartUploadsCommand}. */ export interface ListMultipartUploadsCommandOutput extends ListMultipartUploadsOutput, __MetadataBearer { } declare const ListMultipartUploadsCommand_base: { new (input: ListMultipartUploadsCommandInput): import("@smithy/smithy-client").CommandImpl; new (__0_0: ListMultipartUploadsCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

This operation lists in-progress multipart uploads in a bucket. An in-progress multipart upload is a * multipart upload that has been initiated by the CreateMultipartUpload request, but * has not yet been completed or aborted.

* *

* Directory buckets - * If multipart uploads in a directory bucket are in progress, you can't delete the bucket until all the in-progress multipart uploads are aborted or completed. *

*
*

The ListMultipartUploads operation returns a maximum of 1,000 multipart uploads in the response. The limit of 1,000 multipart * uploads is also the default * value. You can further limit the number of uploads in a response by specifying the * max-uploads request parameter. If there are more than 1,000 multipart uploads that * satisfy your ListMultipartUploads request, the response returns an IsTruncated element * with the value of true, a NextKeyMarker element, and a NextUploadIdMarker element. * To list the remaining multipart uploads, you need to make subsequent ListMultipartUploads requests. * In these requests, include two query parameters: key-marker and upload-id-marker. * Set the value of key-marker to the NextKeyMarker value from the previous response. * Similarly, set the value of upload-id-marker to the NextUploadIdMarker value from the previous response.

* *

* Directory buckets - The upload-id-marker element and * the NextUploadIdMarker element aren't supported by directory buckets. * To list the additional multipart uploads, you only need to set the value of key-marker to the NextKeyMarker value from the previous response.

*
*

For more information about multipart uploads, see Uploading Objects Using Multipart * Upload in the Amazon S3 * User Guide.

* *

* Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name * . Path-style requests are not supported. For more information, see Regional and Zonal endpoints in the * Amazon S3 User Guide.

*
*
*
Permissions
*
*
    *
  • *

    * General purpose bucket permissions - For information about permissions required to use the multipart upload API, see Multipart Upload * and Permissions in the Amazon S3 * User Guide.

    *
  • *
  • *

    * Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the * CreateSession * API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. * Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see * CreateSession * .

    *
  • *
*
*
Sorting of multipart uploads in response
*
*
    *
  • *

    * General purpose bucket - In the ListMultipartUploads response, the multipart uploads are sorted based on two criteria:

    *
      *
    • *

      Key-based sorting - Multipart uploads are initially sorted in ascending order based on their object keys.

      *
    • *
    • *

      Time-based sorting - For uploads that share the same object key, * they are further sorted in ascending order based on the upload initiation time. Among uploads with the same key, the one that was initiated first will appear before the ones that were initiated later.

      *
    • *
    *
  • *
  • *

    * Directory bucket - In the ListMultipartUploads response, the multipart uploads aren't sorted lexicographically based on the object keys. * *

    *
  • *
*
*
HTTP Host header syntax
*
*

* Directory buckets - The HTTP Host header syntax is * Bucket_name.s3express-az_id.region.amazonaws.com.

*
*
*

The following operations are related to ListMultipartUploads:

* * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { S3Client, ListMultipartUploadsCommand } from "@aws-sdk/client-s3"; // ES Modules import * // const { S3Client, ListMultipartUploadsCommand } = require("@aws-sdk/client-s3"); // CommonJS import * const client = new S3Client(config); * const input = { // ListMultipartUploadsRequest * Bucket: "STRING_VALUE", // required * Delimiter: "STRING_VALUE", * EncodingType: "url", * KeyMarker: "STRING_VALUE", * MaxUploads: Number("int"), * Prefix: "STRING_VALUE", * UploadIdMarker: "STRING_VALUE", * ExpectedBucketOwner: "STRING_VALUE", * RequestPayer: "requester", * }; * const command = new ListMultipartUploadsCommand(input); * const response = await client.send(command); * // { // ListMultipartUploadsOutput * // Bucket: "STRING_VALUE", * // KeyMarker: "STRING_VALUE", * // UploadIdMarker: "STRING_VALUE", * // NextKeyMarker: "STRING_VALUE", * // Prefix: "STRING_VALUE", * // Delimiter: "STRING_VALUE", * // NextUploadIdMarker: "STRING_VALUE", * // MaxUploads: Number("int"), * // IsTruncated: true || false, * // Uploads: [ // MultipartUploadList * // { // MultipartUpload * // UploadId: "STRING_VALUE", * // Key: "STRING_VALUE", * // Initiated: new Date("TIMESTAMP"), * // StorageClass: "STANDARD" || "REDUCED_REDUNDANCY" || "STANDARD_IA" || "ONEZONE_IA" || "INTELLIGENT_TIERING" || "GLACIER" || "DEEP_ARCHIVE" || "OUTPOSTS" || "GLACIER_IR" || "SNOW" || "EXPRESS_ONEZONE", * // Owner: { // Owner * // DisplayName: "STRING_VALUE", * // ID: "STRING_VALUE", * // }, * // Initiator: { // Initiator * // ID: "STRING_VALUE", * // DisplayName: "STRING_VALUE", * // }, * // ChecksumAlgorithm: "CRC32" || "CRC32C" || "SHA1" || "SHA256", * // }, * // ], * // CommonPrefixes: [ // CommonPrefixList * // { // CommonPrefix * // Prefix: "STRING_VALUE", * // }, * // ], * // EncodingType: "url", * // RequestCharged: "requester", * // }; * * ``` * * @param ListMultipartUploadsCommandInput - {@link ListMultipartUploadsCommandInput} * @returns {@link ListMultipartUploadsCommandOutput} * @see {@link ListMultipartUploadsCommandInput} for command's `input` shape. * @see {@link ListMultipartUploadsCommandOutput} for command's `response` shape. * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape. * * @throws {@link S3ServiceException} *

Base exception class for all service exceptions from S3 service.

* * @public * @example To list in-progress multipart uploads on a bucket * ```javascript * // The following example lists in-progress multipart uploads on a specific bucket. * const input = { * "Bucket": "examplebucket" * }; * const command = new ListMultipartUploadsCommand(input); * const response = await client.send(command); * /* response == * { * "Uploads": [ * { * "Initiated": "2014-05-01T05:40:58.000Z", * "Initiator": { * "DisplayName": "display-name", * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, * "Key": "JavaFile", * "Owner": { * "DisplayName": "display-name", * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, * "StorageClass": "STANDARD", * "UploadId": "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--" * }, * { * "Initiated": "2014-05-01T05:41:27.000Z", * "Initiator": { * "DisplayName": "display-name", * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, * "Key": "JavaFile", * "Owner": { * "DisplayName": "display-name", * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, * "StorageClass": "STANDARD", * "UploadId": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--" * } * ] * } * *\/ * // example id: to-list-in-progress-multipart-uploads-on-a-bucket-1481852775260 * ``` * * @example List next set of multipart uploads when previous result is truncated * ```javascript * // The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads. * const input = { * "Bucket": "examplebucket", * "KeyMarker": "nextkeyfrompreviousresponse", * "MaxUploads": "2", * "UploadIdMarker": "valuefrompreviousresponse" * }; * const command = new ListMultipartUploadsCommand(input); * const response = await client.send(command); * /* response == * { * "Bucket": "acl1", * "IsTruncated": true, * "KeyMarker": "", * "MaxUploads": "2", * "NextKeyMarker": "someobjectkey", * "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", * "UploadIdMarker": "", * "Uploads": [ * { * "Initiated": "2014-05-01T05:40:58.000Z", * "Initiator": { * "DisplayName": "ownder-display-name", * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, * "Key": "JavaFile", * "Owner": { * "DisplayName": "mohanataws", * "ID": "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, * "StorageClass": "STANDARD", * "UploadId": "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--" * }, * { * "Initiated": "2014-05-01T05:41:27.000Z", * "Initiator": { * "DisplayName": "ownder-display-name", * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, * "Key": "JavaFile", * "Owner": { * "DisplayName": "ownder-display-name", * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, * "StorageClass": "STANDARD", * "UploadId": "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--" * } * ] * } * *\/ * // example id: list-next-set-of-multipart-uploads-when-previous-result-is-truncated-1482428106748 * ``` * */ export declare class ListMultipartUploadsCommand extends ListMultipartUploadsCommand_base { }