When an inventory file is generated depends on your configuration. If you have selected “daily”, the inventory file will usually be delivered early in the morning on the next day. If you have selected “weekly”, the inventory file will be generated and delivered on the last day of the current week in most cases.
If you want to be notified upon a successful inventory file delivery, you can go to the SCF console to configure a COS trigger and set Event Type to Use Put Bucket inventory API to create an inventory task.
After an inventory report is generated, you can use the COS Select feature to filter information in the inventory. The following are some examples:
Filtering files whose storage class is STANDARD:
select * from cosobject s where s._7 = TO_STRING('Standard')
Filtering files smaller than 5 GB:
select * from cosobject s where s._4<5*1024*1024
Filtering files larger than 5 GB and use the STANDARD storage class:
select * from cosobject s where s._4>5*1024*1024 AND s._7=TO_STRING('Standard')
Filtering files whose status is “replica” (indicating the replication has been completed):
select * from cosobject s where s._9=TO_STRING('replica')
Viewing the first 100 records in the inventory report:
select * from cosobject s limit 100
You can enable inventory for your bucket. In this way, COS will regularly (daily/weekly) publish an inventory report that contains the object attributes and configuration details.
Note:
- Currently, the inventory feature is not available for Finance Cloud regions.
- The inventory feature incurs Management feature fees. For detailed pricing, please see Product Pricing.
You can get a file list as follows:
COS’s inventory feature regularly reads the latest configuration at midnight every day before it executes tasks.After you modify the inventory configuration, tasks will be executed early in the morning on the next day.
You can use the inventory feature to regularly (daily/weekly) scan specified objects or objects with a specified prefix in a bucket, output an inventory report, and save the CSV file to a specified bucket. After this, you can use “fileFormat” to filter objects by file type and count the quantity.
You can initiate HEAD Object
or List Object
requests to obtain the MD5 checksum of one or more objects and compare the value(s) with the local object(s). For large buckets, you can use the inventory feature to asynchronously obtain the object list as well as the MD5 checksums. For detailed directions, please see Enabling Inventory.
You can enable the inventory feature to automatically output an inventory report, and save the CSV file to a specified bucket. With the inventory feature, you can obtain the file path, file size, last modified time, ETag, storage class, and other information. An object URL can be obtained by combining the bucket’s region and the file path. For more information, please see Inventory Overview.
If there are not a lot of files in the folder, you can use the console to view the folder details, which include the number of files as well as the storage they take up. If the number of objects in your bucket is greater than 10,000, you are advised to query using the inventory feature.
Was this page helpful?