GetBucketInventory
更新时间 2026-04-10 20:09:10
最近更新时间: 2026-04-10 20:09:10
功能说明
GetBucketInventory返回目标桶的某项桶清单配置。
请求消息样式
GET /{Bucket}?inventory&id=xxx HTTP/1.1
Host: xxx.zos.ctyun.cn
x-amz-date: Date
x-amz-content-sha256: Content-SHA256
Authorization: Auth String
Content-Length: ContentLength请求消息参数
| 参数名称 | 参数描述 | 类型 | 是否必须 |
|---|---|---|---|
| Bucket | 参数解释: 桶的名称。 | String | 是 |
| id | 参数解释: 用来标识清单规则的id。 | String | 是 |
请求消息头
该请求使用公共的请求消息头,请参见如何调用API-构造请求-请求消息头。
请求消息元素
该请求消息中不带消息元素。
响应消息样式
HTTP/1.1 Status Code
x-amz-request-id: Request Id
Content-Type: ContentType
Content-Length: ContentLength
Date: Date
Connection: Keep-Alive
<?xml version="1.0" encoding="UTF-8"?>
<InventoryConfiguration>
<Destination>
<S3BucketDestination>
<Bucket>string</Bucket>
<Format>string</Format>
<Prefix>string</Prefix>
</S3BucketDestination>
</Destination>
<IsEnabled>boolean</IsEnabled>
<Filter>
<Prefix>string</Prefix>
</Filter>
<Id>string</Id>
<IncludedObjectVersions>string</IncludedObjectVersions>
<OptionalFields>
<Field>string</Field>
</OptionalFields>
<Schedule>
<Frequency>string</Frequency>
</Schedule>
</InventoryConfiguration>响应消息头
该请求的响应消息使用公共的响应消息头,请参见如何调用API-响应结果-响应消息头。
响应消息元素
该响应中将桶清单配置信息以消息元素的形式返回,元素的具体含义如下表所示 :
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| InventoryConfiguration | 参数解释: 桶清单信息的根标签。 | Container |
表InventoryConfiguration
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| Destination | 参数解释: 清单导出目标的容器。 | Container |
| IsEnabled | 参数解释: 是否启用清单规则。 | Boolean |
| Filter | 参数解释: 包含清单过滤规则,清单仅包括符合条件的对象。 | Container |
| Id | 参数解释: 用来标识清单规则的id。 | String |
| IncludedObjectVersions | 参数解释: 是否列出对象的所有版本。 约束限制: 支持的字段为All和Current。 | String |
| OptionalFields | 参数解释: 包含清单文件中包含的可选字段。 | String |
| Schedule | 参数解释: 指定清单文件的导出周期。 | String |
表Destination
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| S3BucketDestination | 参数解释: 包含清单文件导出目标存储桶,前缀。 | Container |
表S3BucketDestination
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| Bucket | 参数解释: 清单文件导出的目标桶。 | String |
| Format | 参数解释: 清单导出的格式。 约束限制: 只支持CSV格式。 | String |
| Prefix | 参数解释: 导出清单文件的路径。 | String |
表Filter
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| Prefix | 参数解释: 指定源存储桶中需要进行清单导出的文件前缀。 | String |
表OptionalFields
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| Field | 参数解释: 清单文件中的可选字段。 | String |
表Schedule
| 参数名称 | 参数描述 | 类型 |
|---|---|---|
| Frequency | 参数解释: 清单文件导出周期。 约束限制: 支持Daily和Weekly,分别对应每天和每周末导出。 | String |
错误码
请参见调用前必知-错误码-全局错误码。