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 the ListObjectsV2
, ListObjects
, or ListObjectVersions
operation to check whether the objects whose names contain a specific prefix are restored based on the RestoreInfo
response element. After you restore a small number of objects, you can call the HeadObject
operation and specify an object name to check whether the object is restored based on the x-oss-restore
response header.
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
RestoreInfo
response element is not returned.If a restoration operation is in progress,
ongoing-request="true"
is displayed to the right of theRestoreInfo
response element.If a restoration operation is complete,
ongoing-request="false"
is displayed to the right of theRestoreInfo
response element. In this case,expiry-date
is 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:ListObjects
permission. For more information, see Attach a custom policy to a RAM user.To query restoration information about all versions of objects at the same time, you must have the
oss:ListObjectVersions
permission. 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 you want to query restoration information about a small number of specific objects, you can call the HeadObject
operation and check whether the objects are restored based on the x-oss-restore
response header.
If no restoration operation is performed or the restoration operation times out, the
x-oss-restore
response header is not returned.If a restoration operation is in progress,
ongoing-request="true"
is displayed to the right of thex-oss-restore
response header.If a restoration operation is complete,
ongoing-request="false"
is displayed to the right of thex-oss-restore
response header. In this case,expiry-date
is 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 to query restoration information about 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.