History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
/。如您指定了Prefix作为前缀,则 COS 后端投递的清单报告路径为Prefix/inventory_report。GET /?inventory&id=inventory-configuration-ID HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth String
参数 | 描述 | 类型 | 是否必选 |
id | 清单任务的名称。缺省值:None 合法字符: a-z,A-Z,0-9,-,_,. | String | 是 |
<InventoryConfiguration><Id>list1</Id><IsEnabled>true</IsEnabled><Destination><COSBucketDestination><Format>CSV</Format><AccountId>1250000000</AccountId><Bucket>qcs::cos:ap-guangzhou::examplebucket-1250000000</Bucket><Prefix>list1</Prefix><Encryption><SSE-COS></SSE-COS></Encryption></COSBucketDestination></Destination><Schedule><Frequency>Daily</Frequency></Schedule><Filter><Prefix>myPrefix</Prefix></Filter><IncludedObjectVersions>All</IncludedObjectVersions><OptionalFields><Field>Size</Field><Field>LastModifiedDate</Field><Field>ETag</Field><Field>StorageClass</Field><Field>IsMultipartUploaded</Field><Field>ReplicationStatus</Field><Field>Tag</Field><Field>Crc64</Field><Field>x-cos-meta-*</Field></OptionalFields></InventoryConfiguration>
节点名 | 父节点 | 描述 | 类型 |
Inventory Configuration | 无 | 包含清单的配置参数 | Container |
Id | Inventory Configuration | 清单的名称,与请求参数中的 ID 对应 | Container |
IsEnabled | Inventory Configuration | 清单是否启用的标识: 如果设置为 true,清单功能将生效 如果设置为 false,将不生成任何清单 | String |
IncludedObject Versions | Inventory Configuration | 是否在清单中包含对象版本: 如果设置为 All ,清单中将会包含所有对象版本,并在清单中增加 VersionId, IsLatest, DeleteMarker 这几个字段 如果设置为 Current,则清单中不包含对象版本信息 | String |
Filter | Inventory Configuration | 筛选待分析对象。清单功能将分析符合 Filter 中设置的前缀的对象 | Container |
And | Filter | 筛选待分析对象时,如果同时需要前缀与对象标签条件,需要用 And 包装 | Container |
Prefix | And | 需要分析的对象的前缀 | String |
Tag | And | 筛选待分析对象时,可以用对象标签(支持多个)作为过滤条件 | Container |
Period | Filter | 需要分析的对象的创建时间范围 | Container |
StartTime | Period | 需要分析的对象创建的起始时间,参数为秒级时间戳,如1568688761 | String |
EndTime | Period | 需要分析的对象创建的结束时间,参数为秒级时间戳,如1568688762 | String |
OptionalFields | Inventory Configuration | 设置清单结果中应包含的分析维度 | Container |
Field | OptionalFields | 清单结果中可选包含的分析项目名称,可选字段包括: Size,LastModifiedDate,StorageClass,ETag,IsMultipartUploaded,ReplicationStatus,Tag,Crc64,x-cos-meta-*注意,如果筛选条件里使用了对象标签,在这里也必须添加 Tag 此外,也支持用户填写 x-cos-meta-*形式的自定义头部,如x-cos-meta-testheader。清单会将相应的对象元数据输出,若对象不包含该元数据,则为空 | String |
Schedule | Inventory Configuration | 配置清单任务周期 | Container |
Frequency | Schedule | 清单任务周期,可选项为按日或者按周 | String |
Destination | Inventory Configuration | 描述存放清单结果的信息 | Container |
COSBucket Destination | Destination | 清单结果导出后存放的存储桶信息 | Container |
Bucket | COSBucket Destination | 清单分析结果的存储桶名 | String |
AccountId | COSBucket Destination | 存储桶的所有者 ID | String |
Prefix | COSBucket Destination | 清单分析结果的前缀 | String |
Format | COSBucket Destination | 清单分析结果的文件形式,可选项为 CSV 格式和 ORC 格式 | String |
Encryption | COSBucket Destination | 为清单结果提供服务端加密的选项 | Container |
SSE-COS | Encryption | COS 托管密钥的加密方式 | Container |
examplebucket-1250000000中获取清单任务为 list1 的配置信息。GET /?inventory&id=list1 HTTP/1.1Date: Mon, 28 Aug 2018 02:53:38 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1503895278;1503895638&q-key-time=1503895278;1503895638&q-header-list=host&q-url-param-list=inventory&q-signature=f77900be432072b16afd8222b4b349aabd83****Host: examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com
examplebucket-1250000000中前缀为 myPrefix 的对象及其所有版本。HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 331Date: Mon, 28 Aug 2018 02:53:39 GMTServer: tencent-cosx-cos-request-id: NTlhMzg1ZWVfMjQ4OGY3MGFfMWE1NF84Y2M<?xml version = "1.0" encoding = "UTF-8"><InventoryConfiguration xmlns = "http://...."><Id>list1</Id><IsEnabled>true</IsEnabled><Destination><COSBucketDestination><Format>CSV</Format><AccountId>1250000000</AccountId><Bucket>qcs::cos:ap-guangzhou::examplebucket-1250000000</Bucket><Prefix>list1</Prefix><Encryption><SSE-COS></SSE-COS></Encryption></COSBucketDestination></Destination><Schedule><Frequency>Daily</Frequency></Schedule><Filter><Prefix>myPrefix</Prefix></Filter><IncludedObjectVersions>All</IncludedObjectVersions><OptionalFields><Field>Size</Field><Field>LastModifiedDate</Field><Field>ETag</Field><Field>StorageClass</Field><Field>IsMultipartUploaded</Field><Field>ReplicationStatus</Field></OptionalFields></InventoryConfiguration>
examplebucket-1250000000中获取清单任务为 list2 的配置信息。GET /?inventory&id=list2 HTTP/1.1Date: Mon, 28 Aug 2018 02:53:38 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1503895278;1503895638&q-key-time=1503895278;1503895638&q-header-list=host&q-url-param-list=inventory&q-signature=f77900be432072b16afd8222b4b349aabd83****Host: examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com
examplebucket-1250000000中前缀为 myPrefix,且含有对象标签{age:18}的对象及其所有版本。HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 331Date: Mon, 28 Aug 2018 02:53:39 GMTServer: tencent-cosx-cos-request-id: NTlhMzg1ZWVfMjQ4OGY3MGFfMWE1NF84Y2M<?xml version = "1.0" encoding = "UTF-8"><InventoryConfiguration xmlns = "http://...."><Id>list2</Id><IsEnabled>true</IsEnabled><Destination><COSBucketDestination><Format>CSV</Format><AccountId>1250000000</AccountId><Bucket>qcs::cos:ap-guangzhou::inventorybucket-1250000000</Bucket></COSBucketDestination></Destination><Schedule><Frequency>Daily</Frequency></Schedule><Filter><And><Prefix>myPrefix</Prefix><Tag><Key>age</Key><Value>18</Value></Tag></And></Filter><IncludedObjectVersions>All</IncludedObjectVersions><OptionalFields><Field>Size</Field><Field>LastModifiedDate</Field><Field>StorageClass</Field><Field>ETag</Field><Field>Tag</Field></OptionalFields></InventoryConfiguration>
文档反馈