The abort-multipart-upload command is used to cancel multipart upload tasks and delete the uploaded parts.
Usage notes
The Upload ID of the multipart upload task that you want to cancel is required.
When you cancel a multipart upload task, parts that are being uploaded cannot be deleted. After a multipart upload task is canceled, the Upload ID of the task cannot be used to perform any operations and the parts uploaded by the task are deleted.
We recommend that you complete or cancel multipart upload tasks in a timely manner because parts that are uploaded by these tasks consume storage space and incur storage fees.
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 |
AbortMultipartUpload |
| Cancels a multipart upload task and deletes uploaded parts. |
Command syntax
ossutil api abort-multipart-upload --bucket examplebucket --key exampleobject --upload-id 123The abort-multipart-upload command corresponds to the AbortMultipartUpload operation. For more information about the parameters in the AbortMultipartUpload operation, see AbortMultipartUpload.
Parameter | Type | Description |
--bucket | string | Name of the bucket. |
--key | string | Full path of the object. |
--upload-id | string | ID of the MultipartUpload task. |
For more information about supported global command-line options, see Command-line options.
Example
Cancel the multipart upload task performed on exampleobject whose Upload ID is 123, and delete the uploaded parts.
ossutil api abort-multipart-upload --bucket examplebucket --key exampleobject --upload-id 123