/ after your specified prefix. For example, if you specify Prefix as the prefix, the inventory report path delivered by the COS backend will be Prefix/inventory_report.PUT /?inventory&id=inventory-configuration-ID HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth StringContent-MD5: MD5
Parameter | Description | Type | Required or Not |
id | Inventory task name. Default value: None Valid characters: a–z, A–Z, 0–9, -, _, . | String | Yes |
<InventoryConfiguration><Id>list1</Id><IsEnabled>true</IsEnabled><Destination><COSBucketDestination><Format>CSV</Format><AccountId>100000000001</AccountId><Bucket>qcs::cos:ap-guangzhou::examplebucket-1250000000</Bucket><Prefix>list1</Prefix><Encryption><SSE-COS></SSE-COS></Encryption></COSBucketDestination></Destination><Schedule><Frequency>Daily|Weekly|Monthly</Frequency><MonthlyDate></MonthlyDate></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>
Node Name | Parent Node | Description | Type | Required or Not |
InventoryConfiguration | N/A | Inventory configuration parameters. | Container | Yes |
Id | InventoryConfiguration | Name of the inventory, corresponding to the id parameter in the request. | String | Yes |
IsEnabled | InventoryConfiguration | Identifier of whether the inventory is enabled. If it is set to true, the inventory feature takes effect. If it is set to false, no inventory is generated. | Boolean | Yes |
IncludedObjectVersions | InventoryConfiguration | Whether to include the object version in the inventory. If it is set to All, the inventory includes all object versions, and the VersionId, IsLatest, and DeleteMarker fields are added to the inventory. If it is set to Current, the inventory does not include the object version information. | String | Yes |
Filter | InventoryConfiguration | Filters out objects for analysis. The inventory feature analyzes objects that match the prefix set in Filter. | Container | No |
And | Filter | If both the prefix and object tag conditions are required for filtering out objects to be analyzed, And is required. | Container | No |
Prefix | And | Prefix of the object to be analyzed. | String | No |
Tag | And | When objects for analysis are filtered out, one or more object tags can be used as filter conditions. | Container | No |
Period | Filter | Creation time range of the objects to be analyzed. | Container | No |
StartTime | Period | Start creation time of the objects to be analyzed. The parameter is a second-level timestamp, such as 1568688761. | String | No |
EndTime | Period | End creation time of the objects to be analyzed. The parameter is a second-level timestamp, such as 1568688762. | String | No |
OptionalFields | InventoryConfiguration | Analysis items that should be included in the inventory result. | Container | No |
Field | OptionalFields | Names of optional analysis items in the inventory result. Optional fields include: Size, LastModifiedDate, StorageClass, ETag, IsMultipartUploaded, ReplicationStatus, Tag, Crc64, and x-cos-meta-*.Note: If object tags are used in the filter conditions, tags should be added here. In addition, users can enter custom headers in x-cos-meta-* format, such as x-cos-meta-testheader. The inventory outputs the corresponding object metadata. If the object does not contain that metadata, it is empty. | String | No |
Schedule | InventoryConfiguration | Configures the inventory task period. | Container | Yes |
Frequency | Schedule | Inventory task frequency. Options include: Daily, Weekly, or Monthly. With the monthly option, the specific inventory output date must be specified. | String | Yes |
MonthlyDate | Schedule | If Monthly is specified, the specific inventory output date needs to be specified. The value range is 1 to 28. | Integer | No |
Destination | InventoryConfiguration | Information about the inventory result destination. | Container | Yes |
COSBucketDestination | Destination | Information about the bucket where the exported inventory results are stored. | Container | Yes |
Bucket | COSBucketDestination | Name of the bucket where the inventory analysis results are stored. | String | Yes |
AccountId | COSBucketDestination | The bucket owner's UIN (root account), such as 100000000001. This can be viewed in Account Information. | String | No |
Prefix | COSBucketDestination | Prefix of the inventory analysis results. | String | No |
Format | COSBucketDestination | File format of the inventory analysis results. An option is the CSV format. | String | Yes |
Encryption | COSBucketDestination | Option for SSE of the inventory results. | Container | No |
SSE-COS | Encryption | Encryption method of the COS-managed key, which does not need to be specified. | Container | No |
examplebucket-1250000000.examplebucket-1250000000, with the prefix list1 and encrypted using SSE-COS.PUT /?inventory&id=list1 HTTP/1.1Date: Mon, 28 Aug 2018 02:53:38 GMTAuthorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1503888878;1503889238&q-key-time=1503888878;1503889238&q-header-list=host&q-url-param-list=inventory&q-signature=****************************************Content-MD5: AAq9nzrpsz5LJ4UEe1f6Q==Host: examplebucket-1250000000.cos.ap-guangzhou.myqcloud.comContent-Length: 1024<?xml version = "1.0" encoding = "UTF-8"><InventoryConfiguration xmlns = "http://...."><Id>list1</Id><IsEnabled>true</IsEnabled><Destination><COSBucketDestination><Format>CSV</Format><AccountId>100000000001</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><Period><StartTime>1568688761</StartTime><EndTime>1568688762</EndTime></Period></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>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 0Date: Mon, 28 Aug 2018 02:53:38 GMTServer: tencent-cosx-cos-request-id: NTlhMzg1ZWVfMjQ4OGY3MGFfMWE1NF8****
examplebucket-1250000000.inventorybucket-1250000000.PUT /?inventory&id=list2 HTTP/1.1Date: Mon, 28 Aug 2018 02:53:38 GMTAuthorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1503888878;1503889238&q-key-time=1503888878;1503889238&q-header-list=host&q-url-param-list=inventory&q-signature=****************************************Content-MD5: AAq9nzrpsz5LJ4UEe1f6Q==Host: examplebucket-1250000000.cos.ap-guangzhou.myqcloud.comContent-Length: 1024<?xml version = "1.0" encoding = "UTF-8"><InventoryConfiguration xmlns = "http://...."><Id>list2</Id><IsEnabled>true</IsEnabled><Destination><COSBucketDestination><Format>CSV</Format><AccountId>100000000001</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>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 0Date: Mon, 28 Aug 2018 02:53:38 GMTServer: tencent-cosx-cos-request-id: NTlhMzg1ZWVfMjQ4OGY3MGFfMWE1NF8****
examplebucket-1250000000.inventorybucket-1250000000.PUT /?inventory&id=list2 HTTP/1.1Date: Mon, 28 Aug 2018 02:53:38 GMTAuthorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1503888878;1503889238&q-key-time=1503888878;1503889238&q-header-list=host&q-url-param-list=inventory&q-signature=****************************************Content-MD5: AAq9nzrpsz5LJ4UEe1f6Q==Host: examplebucket-1250000000.cos.ap-guangzhou.myqcloud.comContent-Length: 1024<?xml version = "1.0" encoding = "UTF-8"><InventoryConfiguration xmlns = "http://...."><Id>list2</Id><IsEnabled>true</IsEnabled><Destination><COSBucketDestination><Format>CSV</Format><AccountId>100000000001</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><Field>Crc64</Field><Field>x-cos-meta-myheader</Field></OptionalFields></InventoryConfiguration>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 0Date: Mon, 28 Aug 2018 02:53:38 GMTServer: tencent-cosx-cos-request-id: NTlhMzg1ZWVfMjQ4OGY3MGFfMWE1NF8****
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback