Setting Inventory

Last Updated At: 2025-11-26 15:01:26

Overview

You can use the COS console to enable the inventory feature for your buckets. Enabling the inventory feature allows you to regularly (daily/weekly) export an inventory report about information such as the object attributes and detailed configurations. For more information about inventory, see Inventory Overview. The following describes in detail how to enable the inventory feature for a bucket. Both scheduled and interim inventories are supported. You can choose one as needed.

Note

  • Multiple inventory tasks can be configured for a single bucket.
  • The object content is not directly read during the execution of inventory tasks, and only the attribute information such as the object metadata is scanned.

Prerequisites

The bucket is created.

Directions

Adding a Scheduled List

  1. Log in to the COS console.
  2. In the left sidebar, click Bucket List.
  3. Click to enter the bucket (source bucket) for which you want to enable the inventory feature.
  4. In the left sidebar, select Basic Configuration > Inventory Settings, and click Add Inventory.
  5. On the configuration page, you can configure the following:
    1. Basic Information
      • Rule Status: Select whether to enable the current inventory rule. You can select to enable/disable the inventory.
      • Inventory Name: Type the name of your inventory.
      • Target bucket: Refers to the bucket where the inventory is stored. The initial default destination bucket is the source bucket. The destination bucket must be in the same region as the source bucket.
      • Inventory report prefix (optional): Input a prefix of your choice for the target storage bucket, which can be used to group inventory files in a common location. The initial value is the default value.
    2. Filter Conditions
      • File range: Select the scope of the inventory objects. You can select the entire bucket or some files with the same prefix. For example, to select all files in the doc path under the folder path in the bucket, specify the file prefix as folder/doc.
      • Object Version: Select whether the inventory will include all versions of the object or only the current version. If this is not selected, only the current version will be kept by default.
      • Object Tag: List objects with the same tag to the inventory through filtering. If this is left blank, no filtering will be performed by default.
      • Filtering Time (optional): List objects whose modification time is after a certain time point or within a certain time to the inventory through filtering. If this is not set, no filtering will be performed by default.
      • Custom output header (optional): If you need to include custom headers of the object in the inventory report, you can fill in the custom headers to be output. Only x-cos-meta-* headers are supported. If not filled in, the custom header will not be output by default.
      • Inventory Information: Select the corresponding object information to be included in the inventory report. The options are object size, storage type, ETag, bucket replication status, multipart upload status, last update date, tag, and CRC64. If this is not selected, all options will be selected by default.

        Description

  • ETag (Entity Tag) is a hash of an object. ETag reflects only changes to the content of an object but not changes to its metadata. The ETag is not necessarily an MD5 digest of the object's data, depending on how the object was created and encrypted.
  • By default, the generated inventory content contains the Appid, Bucket, Key, and LastModifiedTime fields.
  • If versioning is enabled for the bucket, the generated inventory contents have the Version ID, IsLatest, and IsDeleteMarker fields added.
  1. Output Format
    • Output format: The output inventory file format is a CSV file compressed using GZIP.
    • Generation Cycle: Select whether to generate the inventory daily/weekly/monthly. The default is to generate the inventory daily. The specific time to generate the inventory depends on the amount of data. The description of the configuration is shown below:
      • Daily: For example, if an inventory is added at 15:00 p.m., the inventory file will usually be generated and delivered to the target storage bucket at 6:00 a.m. the next day at the latest.
      • Weekly: By default, the inventory is generated in a 7-day cycle. For example, if you start the inventory on September 1st, the first inventory will be generated on September 2nd, and then on September 9th, September 16th, September 23rd, and so on, with a 7-day cycle.
    • Inventory Encryption: Select whether the inventory needs server-side encryption. The options are:
      • No encryption: The inventory will not be encrypted. This is the default option.
      • SSE-COS: Encrypt reports using server encryption with COS-managed keys.
    • Access authorization: Disabled by default. After enabling access authorization, you can proceed to the next step.
  2. Confirmation of Information
    Confirm the inventory configuration information for the bucket. If you need to modify, click Previous.
  3. After confirming that the configurations are correct, click OK. Afterward, COS will generate inventory files daily or weekly and ship them to the destination bucket you set.

    Description

    For details on the format and content of the inventory report generated by the inventory feature, see Feature Overview of Inventory.

Generating Instant Inventory

  1. Log in to the COS console.
  2. In the left sidebar, click Bucket List, and then click to enter the bucket (source bucket) for which you want to enable the inventory feature.
  3. Click Basic Configuration > Inventory Settings on the left and select an inventory rule. Click Generating inventory immediately on the right to generate an inventory instantly.

    Description

    • If you have not configured an inventory, configure an inventory first to generate an instant inventory.