- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListPartsCommand
This operation lists the parts of an archive that have been uploaded in a specific multipart upload. You can make this request at any time during an in-progress multipart upload before you complete the upload (see CompleteMultipartUpload. List Parts returns an error for completed uploads. The list returned in the List Parts response is sorted by part range.
The List Parts operation supports pagination. By default, this operation returns up to 50 uploaded parts in the response. You should always check the response for a marker
at which to continue the list; if there are no more items the marker
is null
. To return a list of parts that begins at a specific part, set the marker
request parameter to the value you obtained from a previous List Parts request. You can also limit the number of parts returned in the response by specifying the limit
parameter in the request.
An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see Access Control Using AWS Identity and Access Management (IAM) .
For conceptual information and the underlying REST API, see Working with Archives in Amazon S3 Glacier and List Parts in the Amazon Glacier Developer Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GlacierClient, ListPartsCommand } from "@aws-sdk/client-glacier"; // ES Modules import
// const { GlacierClient, ListPartsCommand } = require("@aws-sdk/client-glacier"); // CommonJS import
const client = new GlacierClient(config);
const input = { // ListPartsInput
accountId: "STRING_VALUE", // required
vaultName: "STRING_VALUE", // required
uploadId: "STRING_VALUE", // required
marker: "STRING_VALUE",
limit: Number("int"),
};
const command = new ListPartsCommand(input);
const response = await client.send(command);
// { // ListPartsOutput
// MultipartUploadId: "STRING_VALUE",
// VaultARN: "STRING_VALUE",
// ArchiveDescription: "STRING_VALUE",
// PartSizeInBytes: Number("long"),
// CreationDate: "STRING_VALUE",
// Parts: [ // PartList
// { // PartListElement
// RangeInBytes: "STRING_VALUE",
// SHA256TreeHash: "STRING_VALUE",
// },
// ],
// Marker: "STRING_VALUE",
// };
Example Usage
ListPartsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
accountId Required | string | undefined | The |
uploadId Required | string | undefined | The upload ID of the multipart upload. |
vaultName Required | string | undefined | The name of the vault. |
limit | number | undefined | The maximum number of parts to be returned. The default limit is 50. The number of parts returned might be fewer than the specified limit, but the number of returned parts never exceeds the limit. |
marker | string | undefined | An opaque string used for pagination. This value specifies the part at which the listing of parts should begin. Get the marker value from the response of a previous List Parts response. You need only include the marker if you are continuing the pagination of results started in a previous List Parts request. |
ListPartsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ArchiveDescription | string | undefined | The description of the archive that was specified in the Initiate Multipart Upload request. |
CreationDate | string | undefined | The UTC time at which the multipart upload was initiated. |
Marker | string | undefined | An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is |
MultipartUploadId | string | undefined | The ID of the upload to which the parts are associated. |
PartSizeInBytes | number | undefined | The part size in bytes. This is the same value that you specified in the Initiate Multipart Upload request. |
Parts | PartListElement[] | undefined | A list of the part sizes of the multipart upload. Each object in the array contains a |
VaultARN | string | undefined | The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidParameterValueException | client | Returned if a parameter of the request is incorrectly specified. |
MissingParameterValueException | client | Returned if a required header or parameter is missing from the request. |
ResourceNotFoundException | client | Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist. |
ServiceUnavailableException | server | Returned if the service cannot complete the request. |
GlacierServiceException | Base exception class for all service exceptions from Glacier service. |