百度智能云

All Product Document

          Object Storage

          Set Storage Space Inventory

          Overview

          The storage space inventory is a feature that helps users manage objects in the bucket. According to the user's inventory task configuration, BOS can regularly scan the objects specified by the user in the bucket daily or weekly, output an inventory report, and store it in the user-specified bucket in the CSV format. The CSV file lists the object and its corresponding metadata and records the object attribute information required by the user according to the user's configuration information.

          Description:

          • At present, this feature is fully available in the East China - Suzhou region, but you need first to enable the whitelist in the other areas. If you want to use it, please submit a Ticket to contact us.

          Application Scenarios

          The inventory is a feature to help users manage objects in the bucket, which can systematically replace the List API operation of BOS. You can enable the inventory feature to realize (including but not limited to) the following basic purposes:

          • Regularly review and output the file list and file-related attributes.
          • Simplify and speed up the business workflow through regular scanning, and regularly output the file report by the simple configuration without script implementation.

          Set Storage Space Capacity List

          1. Log in to BOS Management Console.
          2. Select the bucket to set the permission in the Bucket List on the left, and then click “Bucket Name” to enter the bucket management directory.
          3. Select the Configuration Management tab in the navbar above.
          4. Select Advanced Configuration on the Configuration Management page, and then click Add Configuration in the Inventory Configuration area to create an inventory rule.

          image.png

          1. Set inventory rules.

          image.png

          Configuration Name Configuration Description
          List status
          • Enable: The inventory rule is effective immediately after its creation. BOS regularly scans and outputs the report according to the rule configuration.
          • Disable: The inventory rule is only created, but not enabled. It can be automatically enabled later.
          List name
          • Enter the inventory rule name, which can only contain uppercase and lowercase letters, numbers, “-“, “_” and “.”. It must start with a letter and have a length of 1-64 characters.
          Inventory storage location
          • Outputs the storage location of the inventory report. It must be other buckets in the current region. It cannot be stored in the current bucket.
          Report inventory prefix
          • Enter the inventory prefix name. You can customize a name as the inventory report prefix generated under this policy.
          Range of including files
          • It can be set to be effective for the entire bucket file or for the prefix file only.
          Inventory export cycle
          • You can set to export the inventory every three days or weekly.
          Inventory export format
          • At present, the inventory report can be exported in the CSV format.

          Descriptions:

          • For each bucket, you can create up to 20 inventory rules at the same time. When it exceeds the maximum number of inventory rules, you need to delete the existing rules and recreate them.
          • At present, the inventory feature of BOS is available free of charge.
          1. Edit or delete inventory rules.

          You can edit the inventory rules created. For example, set the inventory rules disabled to “Enabled”. You can also delete the inventory rules created. After the deletion of an inventory rule, BOS does not continue to enter the inventory report for you according to this rule.

          Inventory Report Content

          The output inventory report contains the following content:

          Field Description Description
          Bucket Bucket name
          Key File name
          Size File data length
          Etag Hash of the object. It may be an MD5 digest with Base64 encoded object data, which depends on the object creation method.
          StorageClass File storage type
          CreateTime File creation time. Time format: yyyy-mm-ddThh:mm:ssZ . Such as: 2016-09-07T00:00:00Z(UTC)
          Previous
          Set Bucket Read and Write Permissions
          Next
          Developer Guide