You can use the bucket inventory feature to export the information about specified objects in a bucket, such as the number, sizes, storage classes, and encryption status of the objects. When you choose between the GetBucket (ListObjects) operation and the bucket inventory feature, we recommend that you use the bucket inventory feature to list a large number of objects.
- You can configure up to 10 inventories in the Object Storage Service (OSS) console.
- You are charged if you use the bucket inventory feature. However, only storage fees for inventory lists and API calling fees are charged during public preview.
- After an inventory is configured for a bucket, OSS generates inventory lists based on the inventory until the inventory is deleted. To save storage space, we recommend that you delete inventory lists that you no longer use in a timely manner.
For more information, see Bucket inventory.
- Log on to the OSS console.
- Click Buckets, and then click the name of the target bucket.
- In the left-side navigation pane, choose Configure. . In the Bucket Inventory section, click
- Click Create Inventory. In the Create Inventory panel, configure the following parameters to create an inventory.
Parameter Required Description Status Yes Set the status of the inventory. You can select Enabled or Disabled. Rule Name Yes Set the name of the inventory. The name can contain only lowercase letters, digits, and hyphens (-) and cannot start or end with a hyphen (-). Destination Bucket Yes Select the bucket in which generated inventory lists are stored.
The destination bucket must be in the same region as the bucket for which the inventory is configured. You can specify the bucket for which the inventory is configured as the destination bucket.
Inventory List Path No Configure the folder in which generated inventory lists are stored. If you do not specify this parameter, inventory lists are stored in the root folder of the destination bucket. Frequency Yes Configure the frequency at which inventory lists are generated. You can select Weekly or Daily.We recommend that you configure the frequency based on the number of objects in the source bucket:
- If the number of objects in the source bucket is smaller than 1 billion, you can configure inventories to export inventory lists on a daily basis.
- If the number of objects in the source bucket is between 1 billion to 10 billion, you can configure inventories to export inventory lists on a weekly basis.
- If the number of objects is greater than 10 billion, we recommend that you select Weekly, configure individual inventory tasks for different object prefixes, and ensure that the number of objects in each inventory task is smaller than 10 billion.
Encryption Method No Configure whether to encrypt inventory lists.
- None: Inventory lists are not encrypted.
- AES-256: Inventory lists are encrypted by using AES-256.
- KMS: Inventory lists are encrypted by using a customer master key (CMK) managed by Key
Management Service (KMS).
To use a CMK to encrypt inventory lists, you must create a CMK in KMS in the same region as the destination bucket. For more information about how to configure CMKs, see Create a CMK.Note You are charged for calling API operations when you use CMKs to encrypt or decrypt data.
Object Versions Yes Select the object version to which the inventory is applied.
If versioning is enabled for the bucket, you can select Current Version or All Versions to export the current version or all versions of objects when you configure inventories for the bucket. For more information, see Overview.
By default, all objects in the bucket are exported if versioning is not enabled for the bucket.
Object Prefix No Set the prefix based on which to scan objects.
Note If no objects in the bucket match the specified prefix, no inventory lists are generated.
- To scan all objects in the bucket, do not specify this parameter.
- To scan all objects in a directory of the bucket, set this parameter to the full path
that does not include bucket names.
To scan all objects in the exampledir1 root directory of the examplebucket bucket, set this parameter to exampledir1/. To scan all objects in the exampledir2 subdirectory of the exampledir1 root directory, set this parameter to exampledir1/exampledir2/.
Optional Fields Yes Select the object information that you want to export to inventory lists. You can select the following fields: Object Size, Storage Class, Last Update Time, ETag, Multipart Upload, and Encryption Status.
- Read and select I understand the terms and agree to authorize Alibaba Cloud OSS to access the resources in my buckets. Click OK.