The list-parts command is used to list all uploaded parts that are mapped to a specified upload ID.
Usage notes
The results returned by Object Storage Service (OSS) are sorted in ascending order by the part numbers.
Errors may occur during network transmission. Do not use the part numbers and ETag values in the results of the ListParts operation to generate the list of uploaded parts.
Permissions
By default, an Alibaba Cloud account has full permissions. RAM users or RAM roles under an Alibaba Cloud account do not have any permissions by default. The Alibaba Cloud account or account administrator must grant operation permissions through RAM Policy or Bucket Policy.
API | Action | Definition |
ListParts |
| Lists all parts that are uploaded by using an upload ID. |
Command syntax
ossutil api list-parts --bucket value --key value --upload-id value [flags]Parameter | Type | Description |
--bucket | string | Name of the bucket. |
--key | string | Full path of the object. |
--encoding-type | string | Encoding type of the object name in the response. |
--max-parts | int | Maximum number of parts in the response of OSS. |
--part-number-marker | int | Position from which the list starts. All parts whose part numbers are greater than the value of this parameter are listed. |
--upload-id | string | ID of the multipart upload task. |
The list-parts command corresponds to the ListParts operation. For more information about the parameters in the ListParts operation, see ListParts.
For more information about supported global command-line options, see Command-line options.
Examples
List all uploaded parts in
examplebucketwhose name isexampleobjectand Upload ID is 123.ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123List all uploaded parts in
examplebucketwhose name isexampleobjectand Upload ID is 123, and display the output in the JSON format.ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123 --output-format jsonList all uploaded parts in
examplebucketwhose name isexampleobjectand Upload ID is 123, and display the output in the YAML format.ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123 --output-format yamlList the first 100 parts in
examplebucket.ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123 --max-parts 100List all parts in
examplebucketand URL-encode the names of the returned objects.ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123 --encoding-type url