List is a function used to help users to manage the storage space objects. It is used to periodically (daily/weekly) generate a list file in a specific format (CSV files are currently supported) for all or part of the objects in the Bucket and store the file in the specified Bucket, and can systematically replace the object storage synchronization List API operation
Based on the list of objects, users can complete some business statistics or batch operation; users can configure multiple list tasks in one Bucket to meet the demands of different dimensions.
The list file will list the stored objects and their corresponding metadata, and record the object attribute information required by users based on their configuration information. During the execution of list tasks, the object content will not be directly read, but only the attribute information of object metadata will be scanned.
A list is generated periodically (daily or weekly); from the date of creating the list configuration, the list files are generated after the specified number of days in the generation cycle. If the list is generated weekly, one report will be generated every 7 days after the initial report is generated.
This part will describe how to configure a list, including detailed information about the list source storage space and target storage space.
The storage space of objects manifested in the list is known as Source Storage Space. The storage space where the list files are stored is called Target Storage Space. Before the list is configured, let's start with two concepts:
Source Storage Space
It is the storage space where the list function is to be enabled. The list manifests the objects stored in the source storage space. You can get a list of the entire storage space or a list filtered by prefix (object key name).
Source Storage Space:
Target Storage Space
It is the storage space where the list is stored. The files manifested in the list will be written in the target storage space, and all list files at the public location in the target storage space will be grouped. You can specify the target (object key name) prefix in the list configuration.
Target Storage Space:
The list will help you to create a list of objects in the storage space according to your predetermined plan for the purpose of storage management. You can configure multiple lists for the storage space. Lists will be sent to the CSV file in the target storage space.
1. Specify the object information to be analyzed in the source storage space
Determine which object information are to be analyzed. Therefore, the following information shall be configured in the source storage space when the list function is configured:
2. Configure the storage information of the list report
You need to specify the storage space policy of the target storage Space, i.e. A list of reports is generated daily or weekly, and which storage space the list of reports is to be stored, and the configuration information required is as follows:
A list file contains the list of objects in the source storage space and the metadata of each object. A list will be stored in the CSV format compressed by GZIP in the target storage space.
A list contains the list of objects in the storage space and the following metadata of each object listed:
You can understand how to configure a list via the console by reference to the following general list function [Console Operation Guide] .
You can understand how to configure the list function via API by reference to the following API document:
List reports and relevant Manifest files will be sent to the target storage space, and the list reports will be distributed to the following path:
destination-prefix/source-bucket/config-ID/
The relevant Manifest files will be distributed to the following location in the target storage space:
destination-prefix/source-bucket/config-ID/YYYY-MM-DDTHH-MMZ/manifest.json destination-prefix/source-bucket/config-ID/YYYY-MM-DDTHH-MMZ/manifest.checksum destination-prefix/source-bucket/config-ID/hive/dt=YYYY-MM-DD-HH-MM/symlink.txt
The lists will be distributed to the following location in the target storage space daily or weekly:
destination-prefix/source-bucket/config-ID/data/example-file-name.csv.gz
The meaning represented by paths is as follows:
The relevant Manifest file includes two files: manifest.json and manifest.checksum.
The description of Manifest file is as follows:
What is a list Manifest?
The Manifest files manifest.json and symlink.txt describe the location of the inventory report. Every time a new inventory report is delivered, it comes with a new set of manifest files. |
The example of Manifest in manifest.json file in the CSV format is as follows:
{ "sourceBucket": "example-source-bucket", "destinationBucket": "example-inventory-destination-bucket", "fileFormat": "CSV", //"version": "2016-11-30", "creationTimestamp": "1514944800000", "fileSchema": "Bucket, Key, VersionId, Size, LastModifiedDate, ETag, StorageClass, IsMultipartUploaded, ReplicationStatus", "files": [ { "key": "Inventory/example-source-bucket/2016-11-06T21-32Z/files/04d73d9debc73d9f0bf85af461abde6c.csv.gz", "size": 21999232, "MD5checksum": "7d40288a09c25b302ad6cb5fced54f35" } ] }
The list report provides the final consistency of the new object and the overwritten PUT, and provides the final consistency of the DELETE. A manifest list is a rolling snapshot of storage space items which are ultimately consistent (i.e. the list may not contain objects that were recently added or removed). For example, when a user performs an operation to upload or delete an object during the execution of a user-configured list task, these operation results may not be reflected in the list report.
If you need to verify the status of an object before it execute the operation, it is recommended to execute the HEAD Object API request to retrieve the metadata of this object or inspect the object attribute on the object storage console.
OSS list provides a list of flat files of your objects and metadata, and this list will systematically supersede OSS to synchronize List API operation. OSS list provides the object of storage space or shared prefix (i.e. an object of which the name starts with the same character string) with comma-separated values (CSV) used for listing your object and its corresponding metadata on a daily or weekly basis.
Create the storage space permission policy on the target storage space that grants OSS write permissions. In this way, OSS can write the data of list report in the storage space.
If you select the target storage space in another account and do not have permission to read and write the storage space policy, you will see the following messages: ‘Failed to save. Failed to create a Bucket policy on the destination Bucket. Please contact the destination Bucket owner to add the relevant Bucket policy and allow this account to place data in Bucket’. In this case, target storage space owner must add the displayed storage space policy to the target storage space. If the policy fails to be added to the target storage space, you will not get the list report, because the source storage space owner has no permission to write it in the target storage space.
我们的产品专家为您找到最合适的产品/解决⽅案
1v1线上咨询获取售前专业咨询
专业产品顾问,随时随地沟通