forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
198 lines
16 KiB
HTML
198 lines
16 KiB
HTML
<a name="EN-US_TOPIC_0125560388"></a><a name="EN-US_TOPIC_0125560388"></a>
|
|
|
|
<h1 class="topictitle1">POST Object restore</h1>
|
|
<div id="body1489063698853"><p id="EN-US_TOPIC_0125560388__p66533448204855">If you want to obtain the content of a Cold object, restore the object first. Then, you can download the object.</p>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section61930124204855"><h4 class="sectiontitle">Versioning</h4><p id="EN-US_TOPIC_0125560388__p50284172204855">By default, the object of the latest version is restored. If the object has a delete marker, status code 404 is returned. To restore an object of a specified version, the <strong id="EN-US_TOPIC_0125560388__b66341936151813">versionId</strong> parameter can be used to specify the desired version.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section16245225204959"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560388__screen61171330205116">POST /ObjectName?restore&versionId=VersionID HTTP/1.1
|
|
User-Agent: agent
|
|
Host: bucketname.obs.example.com
|
|
Accept: */*
|
|
Date: date
|
|
Authorization: authorization string
|
|
Content-MD5: MD5
|
|
|
|
<RestoreRequest>
|
|
<Days>NumberOfDays</Days>
|
|
<GlacierJobParameters>
|
|
<Tier>RetrievalOption</Tier>
|
|
</GlacierJobParameters>
|
|
</RestoreRequest></pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section24286729205229"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560388__table63064893205318" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0125560388__row29419945205318"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.4.2.1.4.1.1"><p id="EN-US_TOPIC_0125560388__p34205369205318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="62.629999999999995%" id="mcps1.3.4.2.1.4.1.2"><p id="EN-US_TOPIC_0125560388__p19171522205318">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.15%" id="mcps1.3.4.2.1.4.1.3"><p id="EN-US_TOPIC_0125560388__p9389419205318">Remarks</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0125560388__row22345436205318"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.4.2.1.4.1.1 "><p id="EN-US_TOPIC_0125560388__p65149886205318">versionId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.629999999999995%" headers="mcps1.3.4.2.1.4.1.2 "><p id="EN-US_TOPIC_0125560388__p42649400205318">Version ID of the Cold object to be restored.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p48300286205318">Type: String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.15%" headers="mcps1.3.4.2.1.4.1.3 "><p id="EN-US_TOPIC_0125560388__p20009104205318">Optional</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section65131379205237"><h4 class="sectiontitle">Request Headers</h4><p id="EN-US_TOPIC_0125560388__p41150381205237">This request uses common headers. For details, see section <a href="en-us_topic_0125560462.html">Common Request Headers</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section0926151615554"><h4 class="sectiontitle">Request Elements</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560388__table38605968205415" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request elements</caption><thead align="left"><tr id="EN-US_TOPIC_0125560388__row38119865205415"><th align="left" class="cellrowborder" valign="top" width="26.25262526252625%" id="mcps1.3.6.2.2.4.1.1"><p id="EN-US_TOPIC_0125560388__p701350205415">Element</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="49.56495649564957%" id="mcps1.3.6.2.2.4.1.2"><p id="EN-US_TOPIC_0125560388__p56809371205415">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.18241824182418%" id="mcps1.3.6.2.2.4.1.3"><p id="EN-US_TOPIC_0125560388__p38156353205415">Remarks</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0125560388__row45698087191234"><td class="cellrowborder" valign="top" width="26.25262526252625%" headers="mcps1.3.6.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p8629607191234">RestoreRequest</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.56495649564957%" headers="mcps1.3.6.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p6395843719133">Container for restore information.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p1325091519133">Type: Container</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.18241824182418%" headers="mcps1.3.6.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p46083083191234">Mandatory</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560388__row3656895205415"><td class="cellrowborder" valign="top" width="26.25262526252625%" headers="mcps1.3.6.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p27773118205415">Days</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.56495649564957%" headers="mcps1.3.6.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p35030118205415">Indicates the retention period of the restored object. The value is an integer ranging from 1 to 30.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p46835608205415">Type: Positive integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.18241824182418%" headers="mcps1.3.6.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p35587919205415">Mandatory</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560388__row42995031191243"><td class="cellrowborder" valign="top" width="26.25262526252625%" headers="mcps1.3.6.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p51410962191243">GlacierJobParameters</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.56495649564957%" headers="mcps1.3.6.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p3538385191243">Container for Glacier job parameters.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p44331211191345">Type: Container</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.18241824182418%" headers="mcps1.3.6.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p18173793191243">Optional</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560388__row51855822205415"><td class="cellrowborder" valign="top" width="26.25262526252625%" headers="mcps1.3.6.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p39572063205415">Tier</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.56495649564957%" headers="mcps1.3.6.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p51220536205415">Indicates the retrieval option used when restoring a Cold object.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p58331648205415">Valid Values: <strong id="EN-US_TOPIC_0125560388__b55222786205415">Expedited</strong>, <strong id="EN-US_TOPIC_0125560388__b27243033205415">Standard</strong>, and <strong id="EN-US_TOPIC_0125560388__b43860709205415">Bulk</strong></p>
|
|
<ul id="EN-US_TOPIC_0125560388__ul59202063205415"><li id="EN-US_TOPIC_0125560388__li63056520205415"><strong id="EN-US_TOPIC_0125560388__b30637769205415">Expedited</strong>: indicates that data can be restored within 1 to 5 minutes.</li></ul>
|
|
<ul id="EN-US_TOPIC_0125560388__ul65740207205415"><li id="EN-US_TOPIC_0125560388__li54790959205415"><strong id="EN-US_TOPIC_0125560388__b23356587205415">Standard</strong>: indicates that data can be restored within 3 to 5 hours.</li></ul>
|
|
<ul id="EN-US_TOPIC_0125560388__ul12835362205415"><li id="EN-US_TOPIC_0125560388__li48409400205415"><strong id="EN-US_TOPIC_0125560388__b33031422205415">Bulk</strong>: indicates that data can be restored within 5 to 12 hours.</li></ul>
|
|
<p id="EN-US_TOPIC_0125560388__p10203123231015">The default value is <strong id="EN-US_TOPIC_0125560388__b28847350205415">Standard</strong>.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p58299559205415">Type: String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.18241824182418%" headers="mcps1.3.6.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p24643844205415">Optional</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section6423315205511"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560388__screen50526513205511">HTTP/1.1 status_code
|
|
Server: server
|
|
x-amz-request-id: request id
|
|
x-amz-id-2: id
|
|
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
|
|
Date: date</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section52085441205511"><h4 class="sectiontitle">Response Headers</h4><p id="EN-US_TOPIC_0125560388__p58171224205511">This response uses common headers. For details, see section <a href="en-us_topic_0125560484.html">Common Response Headers</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section53778968205511"><h4 class="sectiontitle">Response Elements</h4><p id="EN-US_TOPIC_0125560388__p61129136205511">This response involves no elements.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section63796171205525"><h4 class="sectiontitle">Error Responses</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560388__table5865346121044" frame="border" border="1" rules="all"><caption><b>Table 2 </b>List of OBS error codes</caption><thead align="left"><tr id="EN-US_TOPIC_0125560388__row2030149621044"><th align="left" class="cellrowborder" valign="top" width="25.509999999999998%" id="mcps1.3.10.2.2.4.1.1"><p id="EN-US_TOPIC_0125560388__p3380844921044">Error Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.059999999999995%" id="mcps1.3.10.2.2.4.1.2"><p id="EN-US_TOPIC_0125560388__p5412981021044">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.43%" id="mcps1.3.10.2.2.4.1.3"><p id="EN-US_TOPIC_0125560388__p2243848421044">HTTP Status Code</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0125560388__row543128521044"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p3728094721044">RestoreAlreadyInProgress</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p6696677021044">The object is being restored. The request conflicts with another.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p6583002621044">ErrorMessage: Object restore is already in progress</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p3063185221044">409 Conflict</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560388__row725121821044"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p5047776221044">ObjectHasAlreadyRestored</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p6216693121044">The object has been restored and the retention period of the restored object is not allowed to be shortened.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p2263147121044">ErrorMessage: After restoring a Cold object, you cannot shorten the restoration period of the Cold object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p2120987621044">409 Conflict</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560388__row5667115821044"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p2696111321044">MalformedXML</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p3636652421044">Invalid value for the <strong id="EN-US_TOPIC_0125560388__b5886326121044">Days</strong> field (not an integer)</p>
|
|
<p id="EN-US_TOPIC_0125560388__p6000730321044">ErrorMessage: The XML you provided was not well-formed or did not validate against our published schema</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p2875337921044">400 Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560388__row5745382321044"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p2324805421044">InvalidArgument</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p404424221044">The value of the <strong id="EN-US_TOPIC_0125560388__b3639818621044">Days</strong> field is not within the range of 1to 30.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p5914821921044">ErrorMessage: restoration days should be at least 1 and at most 30</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p2627644021044">400 Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560388__row3516137421044"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p2949904521044">MalformedXML</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p4061243621044">Invalid value for the <strong id="EN-US_TOPIC_0125560388__b2996761121044">Tier</strong> field.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p127304421044">ErrorMessage: The XML you provided was not well-formed or did not validate against our published schema</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p3600775721044">400 Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0125560388__row5563435821044"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="EN-US_TOPIC_0125560388__p1008911021044">InvalidObjectState</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="EN-US_TOPIC_0125560388__p1191155421044">The restored object is not a Cold object.</p>
|
|
<p id="EN-US_TOPIC_0125560388__p4009512921044">ErrorMessage: Restore is not allowed, as object's storage class is not GLACIER</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="EN-US_TOPIC_0125560388__p2648000321044">403 Forbidden</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section1893604921116"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560388__screen5742502321116">POST /object?restore HTTP/1.1
|
|
User-Agent: curl/7.19.7 (x86_64-suse-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8j zlib/1.2.7 libidn/1.10
|
|
Host: bucketname.obs.example.com
|
|
Accept: */*
|
|
Date: Tue, 07 Mar 2017 08:54:09 +0000
|
|
Authorization: AWS UDSIAMSTUBTEST000002:kaEwOixnSVuS6If3Q0Lnd6kxm5A=
|
|
Content-Length: 183
|
|
Expect: 100-continue
|
|
|
|
<RestoreRequest xmlns="http://s3.amazonaws.com/doc/2006-3-01">
|
|
<Days>3</Days>
|
|
<GlacierJobParameters>
|
|
<Tier>Expedited</Tier>
|
|
</GlacierJobParameters>
|
|
</RestoreRequest></pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0125560388__section4706316021116"><h4 class="sectiontitle">Sample Response</h4><pre class="screen" id="EN-US_TOPIC_0125560388__screen30285901602">HTTP/1.1 100 Continue
|
|
HTTP/1.1 202 Accepted
|
|
Server: OBS
|
|
x-amz-request-id: 00013235600000015AA7FE74DCAE68RC
|
|
x-amz-id-2: W5NZYb1KhRt+updrvY4OCgmESg7R1lsdR3CMA450Gq2jtrc07YAThUJmV8mPg9D4 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
|
|
Content-Length: 0
|
|
Date: Tue, 07 Mar 2017 08:59:15 GMT</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0125560489.html">Operations on Objects</a></div>
|
|
</div>
|
|
</div>
|
|
|