全部产品
Search
文档中心

:list-parts

更新时间:Apr 02, 2025

list-parts用于列举指定Upload ID所属的所有已经上传成功的Part。

注意事项

  • OSS的返回结果按照Part号码升序排列。

  • 由于网络传输可能出错,所以不推荐使用list-parts来返回结果中的Part Number和ETag值来生成已经上传成功的Part列表。

权限说明

阿里云账号默认拥有全部权限。阿里云账号下的RAM用户或RAM角色默认没有任何权限,需要阿里云账号或账号管理员通过RAM PolicyBucket Policy授予操作权限。

API

Action

说明

ListParts

oss:ListParts

列举指定Upload ID所属的所有已经上传成功的Part。

命令格式

ossutil api list-parts --bucket value --key value --upload-id value [flags]

参数

类型

说明

--bucket

string

Bucket名称。

--key

string

Object的完整路径。

--encoding-type

string

指定对返回的内容进行编码,指定编码的类型。

--max-parts

int

规定在OSS响应中的最大Part数目。

--part-number-marker

int

指定List的起始位置,只有Part Number数目大于该参数的Part会被列出。

--upload-id

string

MultipartUpload事件的ID。

说明

使用示例

  • 列举目标存储空间examplebucket名字为exampleobject且Upload ID是123的所有已经上传成功Part。

    ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123
  • 列举目标存储空间examplebucket名字为exampleobject且Upload ID是123的所有已经上传成功Part,以JSON格式显示。

    ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123 --output-format json
  • 列举目标存储空间examplebucket名字为exampleobject且Upload ID是123的所有已经上传成功Part,以YAML格式显示。

    ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123 --output-format yaml
  • 列举目标存储空间examplebucket中前 100 个Part。

    ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123 --max-parts 100
  • 列举目标存储空间examplebucket中所有Part,并对对象名字进行URL编码。

    ossutil api list-parts --bucket examplebucket --key exampleobject --upload-id 123 --encoding-type url