obs_list_versions
| Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
| bucket_name | const char * | No | Explanation: Bucket name. Restrictions:
Default value: None |
| prefix | const char * | No | Explanation: Prefix that the names of objects to list must contain. Restrictions: None Value range: The value can contain 1 to 1,024 characters. Default value: None |
| key_marker | const char * | No | Explanation: Object name to start with when listing object versions in a bucket. All object versions following the specified value are listed in lexicographical order by object name. Restrictions: This parameter is only available for listing objects with multiple versions. Value range: The value of nextKeyMarker in the response body of the last request. Default value: None |
| delimiter | const char * | No | Explanation: This parameter is used to group object names. If a prefix is specified, objects with the same string from the prefix to the first delimiter are grouped into one CommonPrefixes. If no prefix is specified, objects with the same string from the first character to the first delimiter are grouped into one CommonPrefixes. Assume that a bucket has objects abcd, abcde, and bbcde in it. If delimiter is set to d and prefix is set to a, objects abcd and abcde are grouped into a commonPrefix with abcd as the prefix. If only delimiter is set to d, objects abcd and abcde are grouped into a commonPrefix with abcd as the prefix, and bbcde is grouped separately into another commonPrefix with bbcd as the prefix. For a parallel file system, if this parameter is not specified, all the content in the directory is recursively listed by default, including the content in subdirectories. In big data scenarios, file systems usually have multiple directory levels and each directory level has a large number of objects. In such case, you are advised to configure [delimiter=/] to list the content in the current directory but exclude the content in subdirectories, thereby making the listing more efficient. Value range: The value can contain 1 to 1,024 characters. Default value: None |
| max_keys | const char * | No | Explanation: The maximum number of object versions returned in the response in alphabetical order. Restrictions: If the specified value is greater than 1000, 1000 is used by default. Value range: An integer from 1 to 1000 Default value: 1000 |
| versions | No | Explanation: Object information Restrictions: None Value range: None Default value: None | |
| versions_count | int | No | Explanation: Number of versions Restrictions: None Value range: None Default value: None |
| common_prefixes | const char ** | No | Explanation: List of object name prefixes grouped according to the delimiter parameter (if specified) Restrictions: None Value range: None Default value: None |
| common_prefixes_count | int | No | Explanation: Number of common prefixes. Restrictions: None Value range: None Default value: None |
| Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
| key | const char * | No | Explanation: Object name. An object is uniquely identified by an object name in a bucket. An object name is a complete path that does not contain the bucket name. For example, if the access path is examplebucket.obs.ap-southeast-1.myhuaweicloud.com/folder/test.txt, the object name is folder/test.txt. Value range: The value can contain 1 to 1,024 characters. Default value: None |
| version_id | const char * | No | Explanation: Object version ID. Restrictions: None Value range: None Default value: None |
| is_latest | const char * | No | Explanation: Whether the object is the latest version. Restrictions: None Value range: None Default value: None |
| last_modified | int64_t | No | Explanation: Time when the object was last modified, in UTC. Restrictions: None Value range: The value can contain 1 to 1,024 characters. Default value: None |
| etag | const char * | No | Explanation: Base64-encoded, 128-bit MD5 value of an object. It uniquely identifies the content of an object and can be used to check the object integrity. For example, if the ETag is A when an object is uploaded and is B when the object is downloaded, it indicates that the object content has been changed. The ETag value is a hash of the object. The ETag reflects changes to the contents of the object, not its metadata. An object created by an upload or copy operation has a unique ETag after MD5 encryption. Restrictions: None Value range: The value must contain 32 characters. Default value: None |
| size | uint64_t | No | Explanation: Object size in bytes. Restrictions: None Value range: None Default value: None |
| owner_id | const char * | No | Explanation: Domain ID (account ID) of the object owner. Restrictions: None Value range: For details about how to obtain the account ID of the bucket owner, see How Do I Get My Account ID and User ID? Default value: None |
| storage_class | const char * | No | Explanation: Object storage class. Restrictions: None Value range: None Default value: None |
| is_delete | const char * | No | Explanation: Whether the object version is a delete marker. Restrictions: None Value range: None Default value: None |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot