After you restore Archive, Cold Archive, or Deep Cold Archive objects, make sure that the objects are restored before you read the objects. After you restore a large number of objects, you can call related API operations to check the restoration status of objects whose names contain a specific prefix. After you restore a small number of objects, you can call the HeadObject operation to check the restoration status of an object whose name is specified.
Query restoration information about multiple objects at the same time
If you want to query restoration information about multiple objects at the same time, you can call the ListObjectsV2, ListObjects, or ListObjectVersions operation and check the RestoreInfo response element.
If no restoration operation is performed or the restoration operation times out, the
RestoreInforesponse element is not returned.If a restoration operation is in progress,
ongoing-request="true"is displayed to the right of theRestoreInforesponse element.If a restoration operation is complete,
ongoing-request="false"is displayed to the right of theRestoreInforesponse element. In this case,expiry-dateis included in the RestoreInfo response element to indicate the time after which the object cannot be read.
Usage notes
When you call the ListObjectsV2, ListObjects, or ListObjectVersions operation, you cannot specify the storage classes of objects. If you want to filter objects in the returned results based on storage classes, such as Archive, Cold Archive, or Deep Cold Archive, check the storage-class attribute of each object and filter out objects whose storage classes are not specified on the client.
Permissions
To query restoration information about multiple objects at the same time, you must have the
oss:ListObjectspermission.To query restoration information about all versions of objects at the same time, you must have the
oss:ListObjectVersionspermission.For more information, see Attach a custom policy to a RAM user.
You cannot call the ListObjectsV2, ListObjects, or ListObjectVersions operation to query restoration information about multiple objects at the same time in the Object Storage Service (OSS) console or by using ossutil.
Query restoration information about specific objects
If the number of objects is small, you can check the restoration status of objects by calling the HeadObject operation and check the x-oss-restore response header.
If no restoration operation is performed or the restoration operation times out, the
x-oss-restoreresponse header is not returned.If a restoration operation is in progress,
ongoing-request="true"is displayed to the right of thex-oss-restoreresponse header.If a restoration operation is complete,
ongoing-request="false"is displayed to the right of thex-oss-restoreresponse header. In this case,expiry-dateis included in the x-oss-restore response header to indicate the time after which the object cannot be read.
Usage notes
If you call the HeadObject operation for a large number of objects, you are charged high fees for GET requests. For more information, see API operation calling fees.
Permissions
To query restoration information about specific objects, you must have the oss:GetObject permission. For more information, see Attach a custom policy to a RAM user.