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>
546 lines
46 KiB
HTML
546 lines
46 KiB
HTML
<a name="obs_04_0091"></a><a name="obs_04_0091"></a>
|
|
|
|
<h1 class="topictitle1">Modifying Object Metadata</h1>
|
|
<div id="body1540457671959"><div class="section" id="obs_04_0091__section5584184924715"><h4 class="sectiontitle">Functions</h4><p id="obs_04_0091__p12384203811536">This operation modifies, deletes, or adds metadata to uploaded objects in a bucket.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section87117516572"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0091__screen49284209"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/ObjectName?metadata<span class="w"> </span>HTTP/1.1<span class="w"> </span>
|
|
Host:<span class="w"> </span>bucketname.obs.region.example.com
|
|
Content-Type:<span class="w"> </span>application/xml<span class="w"> </span>
|
|
Content-Length:<span class="w"> </span>length
|
|
Authorization:<span class="w"> </span>authorization
|
|
Date:<span class="w"> </span>date
|
|
<span class="nt"><Optional</span><span class="w"> </span><span class="err">Additional</span><span class="w"> </span><span class="err">Header</span><span class="nt">></span><span class="w"> </span>
|
|
<span class="nt"><object</span><span class="w"> </span><span class="err">Content</span><span class="nt">></span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section1335357115716"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0091__table1250415715243" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="obs_04_0091__row55043710247"><th align="left" class="cellrowborder" valign="top" width="21.83%" id="mcps1.3.3.2.2.5.1.1"><p id="obs_04_0091__p1350414711245">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="7.99%" id="mcps1.3.3.2.2.5.1.2"><p id="obs_04_0091__p11614516288"><strong id="obs_04_0091__b2357719203512">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="8.64%" id="mcps1.3.3.2.2.5.1.3"><p id="obs_04_0091__p25040782410"><strong id="obs_04_0091__b1611173733212">Mandatory (Yes/No)</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="61.53999999999999%" id="mcps1.3.3.2.2.5.1.4"><p id="obs_04_0091__p1750437202420"><strong id="obs_04_0091__b53861738123216">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0091__row1350427152410"><td class="cellrowborder" valign="top" width="21.83%" headers="mcps1.3.3.2.2.5.1.1 "><p id="obs_04_0091__p12504207122419">versionId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.99%" headers="mcps1.3.3.2.2.5.1.2 "><p id="obs_04_0091__p185681117153717">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.64%" headers="mcps1.3.3.2.2.5.1.3 "><p id="obs_04_0091__p1150417142416">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.53999999999999%" headers="mcps1.3.3.2.2.5.1.4 "><p id="obs_04_0091__p10499132173719"><strong id="obs_04_0091__b849920329376">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p450416717241">Version ID of the object.</p>
|
|
<p id="obs_04_0091__p126588531210"><strong id="obs_04_0091__b7658115151219">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p365819591212">None</p>
|
|
<p id="obs_04_0091__p1765885121217"><strong id="obs_04_0091__b1565817581219">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p1165818501217">The value must contain 32 characters.</p>
|
|
<p id="obs_04_0091__p1865895181212"><strong id="obs_04_0091__b2065813511124">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p176583591219">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section97291350155820"><h4 class="sectiontitle">Request Headers</h4><div class="note" id="obs_04_0091__note2117145210101"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_04_0091__p12117135221013">OBS supports the six HTTP request headers: Cache-Control, Expires, Content-Encoding, Content-Disposition, Content-Type, and Content-Language. It saves these header values in the metadata of the object. When the object is downloaded or queried, the saved values are set for corresponding HTTP headers and returned to the client.</p>
|
|
</div></div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0091__table1718511168913" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request headers</caption><thead align="left"><tr id="obs_04_0091__row151853161395"><th align="left" class="cellrowborder" valign="top" width="17.87%" id="mcps1.3.4.3.2.5.1.1"><p id="obs_04_0091__p81851416192">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="8.94%" id="mcps1.3.4.3.2.5.1.2"><p id="obs_04_0091__p5945133913914"><strong id="obs_04_0091__b10698141631016">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.64%" id="mcps1.3.4.3.2.5.1.3"><p id="obs_04_0091__p5721145116911"><strong id="obs_04_0091__b1917910573325">Mandatory (Yes/No)</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="63.55%" id="mcps1.3.4.3.2.5.1.4"><p id="obs_04_0091__p71850168910"><strong id="obs_04_0091__b74872058163214">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0091__row101851916899"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p118515163917">x-obs-metadata-directive</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p09457396917">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p177212517913">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p7134184955020"><strong id="obs_04_0091__b185641128883834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p1418517162091">Metadata operation directive.</p>
|
|
<p id="obs_04_0091__p3134134945010"><strong id="obs_04_0091__b84422163312">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p23611488377">None</p>
|
|
<p id="obs_04_0091__p813444912504"><strong id="obs_04_0091__b12981320958417">Value range</strong>:</p>
|
|
<ul id="obs_04_0091__ul158661228288"><li id="obs_04_0091__li1686652162810"><strong id="obs_04_0091__b12259183823716">REPLACE_NEW</strong>: The metadata that has an existing value is replaced. A value is assigned to the metadata that does not have a value. The metadata that is not specified remains unchanged. Custom metadata is replaced.</li><li id="obs_04_0091__li686613212286"><strong id="obs_04_0091__b549016961812">REPLACE</strong>: All original metadata is replaced by metadata specified in the request. Metadata that is not specified (except for <strong id="obs_04_0091__b184902917182">x-obs-storage-class</strong>) is deleted.</li></ul>
|
|
<p id="obs_04_0091__p4134149115014"><strong id="obs_04_0091__b2781798598420">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p20250026171215">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row718515162914"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p191858167911">Cache-Control</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p16945103919920">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p3722151591">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p5491548925"><strong id="obs_04_0091__b200069933883834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p10227806407">It specifies the cache behavior of the web page when an object is downloaded.</p>
|
|
<p id="obs_04_0091__p188371515185711"><strong id="obs_04_0091__b18837141515578">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p1683718157570">None</p>
|
|
<p id="obs_04_0091__p11837191565716"><strong id="obs_04_0091__b208371915165717">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p10837115115711">See the Cache-Control values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p1837201512574"><strong id="obs_04_0091__b68377154570">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p14837171514576">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row1118551610917"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p1018515161399">Content-Disposition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p19945339497">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p472216512917">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p55678501218"><strong id="obs_04_0091__b106666858883834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p18467616124015">It specifies the name of an object when it is downloaded.</p>
|
|
<p id="obs_04_0091__p925011330572"><strong id="obs_04_0091__b32505336578">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p5250153314579">None</p>
|
|
<p id="obs_04_0091__p1925073313572"><strong id="obs_04_0091__b72508332578">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p725073313576">See the Content-Disposition values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p1125020339571"><strong id="obs_04_0091__b152501633185710">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p12502033155715">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row11185151620920"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p171857161893">Content-Encoding</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p169455391298">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p37221551594">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p2586135314212"><strong id="obs_04_0091__b48986223983834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p191851161597">It specifies the content encoding format when an object is downloaded.</p>
|
|
<p id="obs_04_0091__p6730174975713"><strong id="obs_04_0091__b157301649105711">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p1730124920571">None</p>
|
|
<p id="obs_04_0091__p873024915578"><strong id="obs_04_0091__b19730144912572">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p1673012494572">See the Content-Encoding values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p10730649165711"><strong id="obs_04_0091__b8730194985711">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p27301049195710">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row10185216892"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p17185101613912">Content-Language</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p15945183914913">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p97222510914">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p14381056821"><strong id="obs_04_0091__b153755897583834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p776659113917">It specifies the content language format when an object is downloaded.</p>
|
|
<p id="obs_04_0091__p68968122586"><strong id="obs_04_0091__b88961512165812">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p2089614127588">None</p>
|
|
<p id="obs_04_0091__p17896141295811"><strong id="obs_04_0091__b4896612185819">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p789612124584">See the Content-Language values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p148962129587"><strong id="obs_04_0091__b10896812175819">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p15896412125818">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row11852016091"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p151859163919">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p1394511395919">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p2722151694">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p614125915214"><strong id="obs_04_0091__b30497248783834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p918518161694">It specifies the file type of an object when it is downloaded.</p>
|
|
<p id="obs_04_0091__p2489122917588"><strong id="obs_04_0091__b748962915583">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p10489112935817">None</p>
|
|
<p id="obs_04_0091__p16489529175811"><strong id="obs_04_0091__b19489629165813">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p4489152945813">See the Content-Type values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p34891229175816"><strong id="obs_04_0091__b24892029135815">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p15489129175811">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row111858161391"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p8185716599">Expires</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p2945839795">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p172211511494">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p103732113312"><strong id="obs_04_0091__b139168666283834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p10185716496">It specifies the expiration time of a cached web page when an object is downloaded.</p>
|
|
<div class="caution" id="obs_04_0091__note16647134018446"><span class="cautiontitle"> CAUTION: </span><div class="cautionbody"><p id="obs_04_0091__p152141928165218">This parameter is not used to set the object expiration time.</p>
|
|
</div></div>
|
|
<p id="obs_04_0091__p5509651165816"><strong id="obs_04_0091__b05097510586">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p11509125115583">None</p>
|
|
<p id="obs_04_0091__p16509145195811"><strong id="obs_04_0091__b1450985145812">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p8509135115812">See the Expires values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p175091151115811"><strong id="obs_04_0091__b150985125810">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p450925119588">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row1218512161494"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p218513167915">x-obs-website-redirect-location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p0945239691">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p1722651991">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p151411745316"><strong id="obs_04_0091__b3649248283834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p81851216590">If the bucket is configured with website hosting, the request for obtaining the object can be redirected to another object in the bucket or an external URL.</p>
|
|
<p id="obs_04_0091__p3185101613918">In the following example, the request header sets the redirection to an object (<strong id="obs_04_0091__b1138810904">anotherPage.html</strong>) in the same bucket:</p>
|
|
<p id="obs_04_0091__p121854161891">x-obs-website-redirect-location:/anotherPage.html</p>
|
|
<p id="obs_04_0091__p1618519161198">In the following example, the request header sets the object redirection to an external URL:</p>
|
|
<p id="obs_04_0091__p131851916890">x-obs-website-redirect-location:http://www.example.com/</p>
|
|
<p id="obs_04_0091__p17141841136"><strong id="obs_04_0091__b111411847314">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p1188521163910">The value must start with a slash (/), <strong id="obs_04_0091__b170650149544037">http://</strong>, or <strong id="obs_04_0091__b35938046144037">https://</strong> and cannot exceed 2 KB.</p>
|
|
<p id="obs_04_0091__p362103354412"><strong id="obs_04_0091__b562333144420">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p111715240593">None</p>
|
|
<p id="obs_04_0091__p186343324414"><strong id="obs_04_0091__b96317332446">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p1357214262595">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row151851816694"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p81855161197">x-obs-storage-class</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p694514391497">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p107223514919">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p16842562318"><strong id="obs_04_0091__b160550266983834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p1518516164914">Specifies the storage class of an object.</p>
|
|
<p id="obs_04_0091__p10186161613914">Example: <strong id="obs_04_0091__b1050565931">x-obs-storage-class: STANDARD</strong></p>
|
|
<p id="obs_04_0091__p128421065316"><strong id="obs_04_0091__b98421761138">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p205201024461">The value is case-sensitive.</p>
|
|
<p id="obs_04_0091__p5842161312"><strong id="obs_04_0091__b7072906578417">Value range</strong>:</p>
|
|
<ul id="obs_04_0091__ul17424181015116"><li id="obs_04_0091__li14424910219">STANDARD</li><li id="obs_04_0091__li1342418102013">WARM</li><li id="obs_04_0091__li17424410917">COLD</li></ul>
|
|
|
|
<p id="obs_04_0091__p78421761234"><strong id="obs_04_0091__b6427091798420">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p6402148114412">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row51869165914"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p418610162917">x-obs-meta-*</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p1894511391392">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p1672218511994">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p97935385414"><strong id="obs_04_0091__b11317179342">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p2068013498395">Custom metadata of the object. You can add a header starting with <strong id="obs_04_0091__b20716111813553">x-obs-meta-</strong> in the request to define metadata. The custom metadata will be returned in the response when you retrieve the object or query the object metadata.</p>
|
|
<p id="obs_04_0091__p518631618912">Example: <strong id="obs_04_0091__b572172010343">x-obs-meta-test: test metadata</strong></p>
|
|
<p id="obs_04_0091__p639317366215"><strong id="obs_04_0091__b183938361620">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0091__ul93938361220"><li id="obs_04_0091__li839310362215">The total size of all custom metadata cannot exceed 8K. To measure the size, calculate the sum of bytes of all UTF-8 encoded keys and values.</li><li id="obs_04_0091__li239315369212">The custom metadata keys are case-insensitive, but are stored in lowercase by OBS. The key values are case-sensitive.</li><li id="obs_04_0091__li153934361825">Both custom metadata keys and their values must conform to US-ASCII standards. If non-ASCII or unrecognizable characters are required, they must be encoded and decoded in URL or Base64 on the client, because the server does not perform such operations.</li></ul>
|
|
<p id="obs_04_0091__p20393193615212"><strong id="obs_04_0091__b1239320365216">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p1139393612214">None</p>
|
|
<p id="obs_04_0091__p163936361522"><strong id="obs_04_0091__b10393183614210">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p8393136428">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row16186151617910"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.3.2.5.1.1 "><p id="obs_04_0091__p181865161198">x-obs-tagging</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.94%" headers="mcps1.3.4.3.2.5.1.2 "><p id="obs_04_0091__p694503917915">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.64%" headers="mcps1.3.4.3.2.5.1.3 "><p id="obs_04_0091__p1772210517915">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.55%" headers="mcps1.3.4.3.2.5.1.4 "><p id="obs_04_0091__p395914195318"><strong id="obs_04_0091__b35441376483834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p01861169916">An object's tag information in key-value pairs. Multiple tags can be added at the same time.</p>
|
|
<p id="obs_04_0091__p201867165916">Example: <strong id="obs_04_0091__b355608248">x-obs-tagging:TagA=A&TagB&TagC</strong></p>
|
|
<p id="obs_04_0091__p195961912317"><strong id="obs_04_0091__b4115183110343">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0091__ul1618620167918"><li id="obs_04_0091__li131865166913">If a tag key or value contains special characters, equal signs (=), or full-width characters, it must be URL-encoded.</li><li id="obs_04_0091__li1118671619910">If there is no equal sign (=) in a configuration, the tag value is considered left blank.</li></ul>
|
|
<p id="obs_04_0091__p52244813566"><strong id="obs_04_0091__b12224987561">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p622412820567">None</p>
|
|
<p id="obs_04_0091__p922416825613"><strong id="obs_04_0091__b12241583568">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p92246812568">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section104962134593"><h4 class="sectiontitle">Request Elements</h4><p id="obs_04_0091__p1015132214">This request involves no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section18199326165917"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0091__screen3213824"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
|
|
Date:<span class="w"> </span>date
|
|
Content-Length:<span class="w"> </span>length
|
|
Etag:<span class="w"> </span>etag
|
|
Last-Modified:<span class="w"> </span>time
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section66401511596"><h4 class="sectiontitle">Response Headers</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0091__table8675131217308" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Additional response headers</caption><thead align="left"><tr id="obs_04_0091__row106752012133010"><th align="left" class="cellrowborder" valign="top" width="21.7%" id="mcps1.3.7.2.2.4.1.1"><p id="obs_04_0091__p1675141217306">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.3.7.2.2.4.1.2"><p id="obs_04_0091__p0254270309"><strong id="obs_04_0091__b1178614714414">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70.78%" id="mcps1.3.7.2.2.4.1.3"><p id="obs_04_0091__p11676111223013"><strong id="obs_04_0091__b071500342">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0091__row15676181217301"><td class="cellrowborder" valign="top" width="21.7%" headers="mcps1.3.7.2.2.4.1.1 "><p id="obs_04_0091__p56767129308">x-obs-metadata-directive</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.2.2.4.1.2 "><p id="obs_04_0091__p867681253016">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.78%" headers="mcps1.3.7.2.2.4.1.3 "><p id="obs_04_0091__p96558251538"><strong id="obs_04_0091__b212236540783834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p14676191213305">Metadata operation directive.</p>
|
|
<p id="obs_04_0091__p1265614254315"><strong id="obs_04_0091__b10452863118417">Value range</strong>:</p>
|
|
<ul id="obs_04_0091__ul1116820495434"><li id="obs_04_0091__li1616817497436"><strong id="obs_04_0091__b166687112512">REPLACE_NEW</strong>: The metadata that has an existing value is replaced. A value is assigned to the metadata that does not have a value. The metadata that is not specified remains unchanged. Custom metadata is replaced.</li><li id="obs_04_0091__li18169104974319"><strong id="obs_04_0091__b1371614272188">REPLACE</strong>: All original metadata is replaced by metadata specified in the request. Metadata that is not specified (except for <strong id="obs_04_0091__b16717627121811">x-obs-storage-class</strong>) is deleted.</li></ul>
|
|
<p id="obs_04_0091__p55491243125619"><strong id="obs_04_0091__b1575291401">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p1695117458711">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row11676111216304"><td class="cellrowborder" valign="top" width="21.7%" headers="mcps1.3.7.2.2.4.1.1 "><p id="obs_04_0091__p10676191215302">Cache-Control</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.2.2.4.1.2 "><p id="obs_04_0091__p8791293419">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.78%" headers="mcps1.3.7.2.2.4.1.3 "><p id="obs_04_0091__p1353281136"><strong id="obs_04_0091__b62109882383834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p176761412103013">It specifies the cache behavior of the web page when an object is downloaded.</p>
|
|
<p id="obs_04_0091__p163532820314"><strong id="obs_04_0091__b653775914347">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p870615336432">If a request carries this header field, the response message must contain this header field.</p>
|
|
<p id="obs_04_0091__p111235116811"><strong id="obs_04_0091__b151231611882">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p312317117812">See the Cache-control values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p712341784"><strong id="obs_04_0091__b1012311113816">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p41231711483">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row8676111216301"><td class="cellrowborder" valign="top" width="21.7%" headers="mcps1.3.7.2.2.4.1.1 "><p id="obs_04_0091__p1676181218305">Content-Disposition</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.2.2.4.1.2 "><p id="obs_04_0091__p825351134119">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.78%" headers="mcps1.3.7.2.2.4.1.3 "><p id="obs_04_0091__p33879301736"><strong id="obs_04_0091__b56502983483834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p36761512133010">It specifies the name of an object when it is downloaded.</p>
|
|
<p id="obs_04_0091__p2038743017318"><strong id="obs_04_0091__b143875309317">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p61391317134310">If a request carries this header field, the response message must contain this header field.</p>
|
|
<p id="obs_04_0091__p19140515389"><strong id="obs_04_0091__b2014016155814">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p01401151182">See the Content-Disposition values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p714011514810"><strong id="obs_04_0091__b151408156815">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p1514011159812">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row1267661214304"><td class="cellrowborder" valign="top" width="21.7%" headers="mcps1.3.7.2.2.4.1.1 "><p id="obs_04_0091__p7676111253015">Content-Encoding</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.2.2.4.1.2 "><p id="obs_04_0091__p3452171217411">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.78%" headers="mcps1.3.7.2.2.4.1.3 "><p id="obs_04_0091__p16923173210316"><strong id="obs_04_0091__b11294978583834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p1067601233018">It specifies the content encoding format when an object is downloaded.</p>
|
|
<p id="obs_04_0091__p292314321135"><strong id="obs_04_0091__b1392323212316">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p1111711214312">If a request carries this header field, the response message must contain this header field.</p>
|
|
<p id="obs_04_0091__p78341328485"><strong id="obs_04_0091__b1283413281084">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p18834152811811">See the Content-Encoding values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p128343281689"><strong id="obs_04_0091__b19834112819814">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p1883414281816">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row16761712183012"><td class="cellrowborder" valign="top" width="21.7%" headers="mcps1.3.7.2.2.4.1.1 "><p id="obs_04_0091__p2676201273012">Content-Language</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.2.2.4.1.2 "><p id="obs_04_0091__p56611139410">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.78%" headers="mcps1.3.7.2.2.4.1.3 "><p id="obs_04_0091__p038915351317"><strong id="obs_04_0091__b115916631083834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p26765129301">It specifies the content language format when an object is downloaded.</p>
|
|
<p id="obs_04_0091__p113891835035"><strong id="obs_04_0091__b0687912113511">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p2068564619422">If a request carries this header field, the response message must contain this header field.</p>
|
|
<p id="obs_04_0091__p1116544720813"><strong id="obs_04_0091__b516594718815">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p151651475813">See the Content-Language values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p3166647887"><strong id="obs_04_0091__b1016613475815">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p151666471983">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row11676101283015"><td class="cellrowborder" valign="top" width="21.7%" headers="mcps1.3.7.2.2.4.1.1 "><p id="obs_04_0091__p467611213016">Expires</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.2.2.4.1.2 "><p id="obs_04_0091__p1689521444110">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.78%" headers="mcps1.3.7.2.2.4.1.3 "><p id="obs_04_0091__p29792471232"><strong id="obs_04_0091__b70715888783834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p9676112103019">It specifies the expiration time of a cached web page when an object is downloaded.</p>
|
|
<p id="obs_04_0091__p17979134712319"><strong id="obs_04_0091__b189798472317">Restrictions</strong>:</p>
|
|
<p id="obs_04_0091__p18669343421">If a request carries this header field, the response message must contain this header field.</p>
|
|
<p id="obs_04_0091__p47209591882"><strong id="obs_04_0091__b117201859786">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p57201159889">See the Expires values defined in HTTP.</p>
|
|
<p id="obs_04_0091__p972018594812"><strong id="obs_04_0091__b147201659183">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p672013593816">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row1067601213304"><td class="cellrowborder" valign="top" width="21.7%" headers="mcps1.3.7.2.2.4.1.1 "><p id="obs_04_0091__p186767129305">x-obs-website-redirect-location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.2.2.4.1.2 "><p id="obs_04_0091__p10149161615416">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.78%" headers="mcps1.3.7.2.2.4.1.3 "><p id="obs_04_0091__p18695314313"><strong id="obs_04_0091__b3277104283834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p193273314598">If the bucket is configured with website hosting, the request for obtaining the object can be redirected to another object in the bucket or an external URL.</p>
|
|
<p id="obs_04_0091__p54812206912">In the following example, the request header sets the redirection to an object (<strong id="obs_04_0091__b584032412">anotherPage.html</strong>) in the same bucket:</p>
|
|
<p id="obs_04_0091__p148142016916">x-obs-website-redirect-location:/anotherPage.html</p>
|
|
<p id="obs_04_0091__p2481162011910">In the following example, the request header sets the object redirection to an external URL:</p>
|
|
<p id="obs_04_0091__p24812201920">x-obs-website-redirect-location:http://www.example.com/</p>
|
|
<p id="obs_04_0091__p126175319311"><strong id="obs_04_0091__b1395202523520">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0091__ul83477111702"><li id="obs_04_0091__li63471911908">If a request carries this header field, the response message must contain this header field.</li><li id="obs_04_0091__li1534719119015">The value must start with a slash (/), <strong id="obs_04_0091__b39542954244037">http://</strong>, or <strong id="obs_04_0091__b116488780644037">https://</strong> and cannot exceed 2 KB.</li></ul>
|
|
<p id="obs_04_0091__p107515065712"><strong id="obs_04_0091__b97615014576">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p1492283414919">None</p>
|
|
<p id="obs_04_0091__p3761103570"><strong id="obs_04_0091__b949852716350">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p72149361291">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row267681263010"><td class="cellrowborder" valign="top" width="21.7%" headers="mcps1.3.7.2.2.4.1.1 "><p id="obs_04_0091__p367661218308">x-obs-storage-class</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.2.2.4.1.2 "><p id="obs_04_0091__p10573317174110">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.78%" headers="mcps1.3.7.2.2.4.1.3 "><p id="obs_04_0091__p735020551837"><strong id="obs_04_0091__b122209348683834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p0676212123017">It specifies the storage class of an object.</p>
|
|
<p id="obs_04_0091__p13350135513312"><strong id="obs_04_0091__b135014551316">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0091__ul11271573115"><li id="obs_04_0091__li427185710114">If a request carries this header field, the response message must contain this header field.</li><li id="obs_04_0091__li17271057121117">The value is case-sensitive.</li></ul>
|
|
<p id="obs_04_0091__p21332571922"><strong id="obs_04_0091__b14907031163513">Value range</strong>:</p>
|
|
<ul id="obs_04_0091__ul612416012117"><li id="obs_04_0091__li16585131131110">STANDARD</li><li id="obs_04_0091__li15851911151115">WARM</li><li id="obs_04_0091__li85857116114">COLD</li></ul>
|
|
|
|
<p id="obs_04_0091__p413315576212"><strong id="obs_04_0091__b8633634183519">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p183038115107">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0091__row16676112183016"><td class="cellrowborder" valign="top" width="21.7%" headers="mcps1.3.7.2.2.4.1.1 "><p id="obs_04_0091__p1167661213303">x-obs-meta-*</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.3.7.2.2.4.1.2 "><p id="obs_04_0091__p1970311812413">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.78%" headers="mcps1.3.7.2.2.4.1.3 "><p id="obs_04_0091__p123811133201213"><strong id="obs_04_0091__b27943837083834">Explanation</strong>:</p>
|
|
<p id="obs_04_0091__p153812033181217">Custom metadata of the object. You can add custom metadata headers that start with <strong id="obs_04_0091__b36474875744037">x-obs-meta-</strong> for easy object management. When you retrieve or query the metadata of the object, the added custom metadata headers will be returned in the response.</p>
|
|
<p id="obs_04_0091__p43811333131210"><strong id="obs_04_0091__b14512539123515">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0091__ul03815337127"><li id="obs_04_0091__li2381103314129">If a request carries this header field, the response message must contain this header field.</li><li id="obs_04_0091__li10381163318126">The total size of all custom metadata cannot exceed 8K. To measure the size, calculate the sum of bytes of all UTF-8 encoded keys and values.</li><li id="obs_04_0091__li738117333125">The custom metadata keys are case-insensitive, but are stored in lowercase by OBS. The key values are case-sensitive.</li><li id="obs_04_0091__li1038143312122">Both custom metadata keys and their values must conform to US-ASCII standards. If non-ASCII or unrecognizable characters are required, they must be encoded and decoded in URL or Base64 on the client, because the server does not perform such operations.</li></ul>
|
|
<p id="obs_04_0091__p438123391219"><strong id="obs_04_0091__b1938183318121">Value range</strong>:</p>
|
|
<p id="obs_04_0091__p1381103314129">None</p>
|
|
<p id="obs_04_0091__p1338123319120"><strong id="obs_04_0091__b1638133381212">Default value</strong>:</p>
|
|
<p id="obs_04_0091__p173811133171210">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section107960298020"><h4 class="sectiontitle">Response Elements</h4><p id="obs_04_0091__p15500174120">This response contains no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section7010441604"><h4 class="sectiontitle">Error Responses</h4><p id="obs_04_0091__p1170348119">No special error responses are returned. For details about error responses, see <a href="obs_04_0115.html#obs_04_0115__d0e843">Table 2</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section1797652710587"><h4 class="sectiontitle">Sample Request: Adding Metadata for an Object</h4><p id="obs_04_0091__p792612321102">Add the following metadata to the object: <strong id="obs_04_0091__b7701614061">Content-Type:application/zip</strong> and <strong id="obs_04_0091__b67941217662">x-obs-meta-test:meta</strong>.</p>
|
|
<div class="codecoloring" codetype="Xml" id="obs_04_0091__screen41281918122116"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span>
|
|
<span class="normal">9</span></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/object?metadata<span class="w"> </span>HTTP/1.1
|
|
User-Agent:<span class="w"> </span>curl/7.29.0
|
|
Host:<span class="w"> </span>examplebucket.obs.region.example.com
|
|
Accept:<span class="w"> </span>*/*
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>14:24:33<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:NxtSMS0jaVxlLnxlO9awaMTn47s=
|
|
x-obs-metadata-directive:REPLACE_NEW
|
|
Content-Type:application/zip
|
|
x-obs-meta-test:meta
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section1634411453444"><h4 class="sectiontitle">Sample Response: Adding Metadata for an Object</h4><div class="codecoloring" codetype="Xml" id="obs_04_0091__screen91063375488"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span>
|
|
<span class="normal">9</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>8DF400000163D3E4BB5905C41B6E65B6
|
|
Accept-Ranges:<span class="w"> </span>bytes
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSD3nAiTaBoeyt9oHp9vTYtXnLDmwV6D
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>04:19:21<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
x-obs-metadata-directive:REPLACE_NEW
|
|
x-obs-meta-test:meta
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section5110811174511"><h4 class="sectiontitle">Sample Request: Editing Metadata of an Object</h4><p id="obs_04_0091__p12953131514618">If metadata <strong id="obs_04_0091__b206081835154617">x-obs-meta-test:testmeta</strong> exists in the object and the value of <strong id="obs_04_0091__b66131735184615">x-obs-storage-class</strong> is <strong id="obs_04_0091__b0613133524613">WARM</strong>, change the metadata <strong id="obs_04_0091__b186141035114613">x-obs-meta-test</strong> of the object to <strong id="obs_04_0091__b14614203514466">newmeta</strong> and change <strong id="obs_04_0091__b1461443510462">x-obs-storage-class</strong> to <strong id="obs_04_0091__b361463514467">COLD</strong>.</p>
|
|
<div class="codecoloring" codetype="Xml" id="obs_04_0091__screen1533681895619"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span>
|
|
<span class="normal">9</span></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/object?metadata<span class="w"> </span>HTTP/1.1
|
|
User-Agent:<span class="w"> </span>curl/7.29.0
|
|
Host:<span class="w"> </span>examplebucket.obs.region.example.com
|
|
Accept:<span class="w"> </span>*/*
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>14:24:33<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:NxtSMS0jaVxlLnxlO9awaMTn47s=
|
|
x-obs-metadata-directive:REPLACE_NEW
|
|
x-obs-meta-test:newmeta
|
|
x-obs-storage-class:COLD
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section181718381456"><h4 class="sectiontitle">Sample Response: Editing Metadata of an Object</h4><div class="codecoloring" codetype="Xml" id="obs_04_0091__screen5311811121216"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>8DF400000163D3E4BB5905C41B6E65B6
|
|
Accept-Ranges:<span class="w"> </span>bytes
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSD3nAiTaBoeyt9oHp9vTYtXnLDmwV6D
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>04:19:21<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
x-obs-metadata-directive:REPLACE_NEW
|
|
x-obs-meta-test:newmeta
|
|
x-obs-storage-class:COLD
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section588454394519"><h4 class="sectiontitle">Sample Request: Deleting Metadata of an Object</h4><p id="obs_04_0091__p19671119141312">Metadata <strong id="obs_04_0091__b128084214612">x-obs-meta-test:newmeta</strong> and <strong id="obs_04_0091__b9851142194616">Content-Type:application/zip</strong> exist in the object, and delete <strong id="obs_04_0091__b4856429467">x-obs-meta-test</strong>.</p>
|
|
<div class="codecoloring" codetype="Xml" id="obs_04_0091__screen1592817231416"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/object?metadata<span class="w"> </span>HTTP/1.1
|
|
User-Agent:<span class="w"> </span>curl/7.29.0
|
|
Host:<span class="w"> </span>examplebucket.obs.region.example.com
|
|
Accept:<span class="w"> </span>*/*
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>14:24:33<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:NxtSMS0jaVxlLnxlO9awaMTn47s=
|
|
x-obs-metadata-directive:REPLACE
|
|
Content-Type:application/zip
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0091__section99685499019"><h4 class="sectiontitle">Sample Response: Deleting Metadata of an Object</h4><div class="codecoloring" codetype="Xml" id="obs_04_0091__screen115112819173"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>8DF400000163D3E4BB5905C41B6E65B6
|
|
Accept-Ranges:<span class="w"> </span>bytes
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSD3nAiTaBoeyt9oHp9vTYtXnLDmwV6D
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>04:19:21<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
x-obs-metadata-directive:REPLACE
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0079.html">Operations on Objects</a></div>
|
|
</div>
|
|
</div>
|
|
|