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>
106 lines
7.6 KiB
HTML
106 lines
7.6 KiB
HTML
<a name="obs_04_0092"></a><a name="obs_04_0092"></a>
|
|
|
|
<h1 class="topictitle1">Modifying an Object</h1>
|
|
<div id="body1541665569463"><div class="section" id="obs_04_0092__section5584184924715"><h4 class="sectiontitle">Functions</h4><p id="obs_04_0092__p2025912321245">This operation can modify an object from a specified position.</p>
|
|
<div class="note" id="obs_04_0092__note157119479517"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_04_0092__p290817918540">This API is supported only by parallel file systems. For details about how to create a parallel file system, see <a href="obs_04_0021.html#obs_04_0021__section4293341135610">Sample Request: Creating a Parallel File System</a>.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="obs_04_0092__section117547365453"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="obs_04_0092__screen1082453613457">PUT /ObjectName?modify&position=<em id="obs_04_0092__i20662171325010">Position</em> HTTP/1.1
|
|
Host: <em id="obs_04_0092__i123441746202313">bucketname</em>.obs.<em id="obs_04_0092__i034434682311">region</em>.example.com
|
|
Content-Type: <em id="obs_04_0092__i332324111413">type</em>
|
|
Content-Length: <em id="obs_04_0092__i882353664517">length</em>
|
|
Authorization: <em id="obs_04_0092__i2823536164510">authorization</em>
|
|
Date: <em id="obs_04_0092__i188230367454">date</em>
|
|
<object Content></pre>
|
|
</div>
|
|
<div class="section" id="obs_04_0092__section7884173212178"><h4 class="sectiontitle">Request Parameters</h4><p id="obs_04_0092__p16309123521716">The request needs to specify parameters in the message, indicating that the upload is for modification, and specifying the position in the object to be modified. <a href="#obs_04_0092__table925513139324">Table 1</a> describes the parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0092__table925513139324"></a><a name="table925513139324"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0092__table925513139324" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="obs_04_0092__row19257131316329"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.4.1.1"><p id="obs_04_0092__p1225711133328">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="63.61%" id="mcps1.3.3.3.2.4.1.2"><p id="obs_04_0092__p42576139327">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.39%" id="mcps1.3.3.3.2.4.1.3"><p id="obs_04_0092__p02571613203212">Mandatory</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0092__row142578134329"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.4.1.1 "><p id="obs_04_0092__p152571913133211">modify</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.61%" headers="mcps1.3.3.3.2.4.1.2 "><p id="obs_04_0092__p1257131311321">Indicates that the file is uploaded for modification.</p>
|
|
<p id="obs_04_0092__p13637133619365">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.39%" headers="mcps1.3.3.3.2.4.1.3 "><p id="obs_04_0092__p725751343214">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0092__row10257191363215"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.4.1.1 "><p id="obs_04_0092__p112574136328">position</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.61%" headers="mcps1.3.3.3.2.4.1.2 "><p id="obs_04_0092__p8257141319329">Position in the object where the modification starts</p>
|
|
<p id="obs_04_0092__p985361893716">Type: integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.39%" headers="mcps1.3.3.3.2.4.1.3 "><p id="obs_04_0092__p112571113123211">Yes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0092__section31243759"><h4 class="sectiontitle">Request headers</h4><p class="msonormal" id="obs_04_0092__p55973588">This request uses common request headers. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0092__section12758381"><h4 class="sectiontitle">Request Elements</h4><p class="msonormal" id="obs_04_0092__p2556808">This request involves no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0092__section179891558194514"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0092__screen12373253185310"><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></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
|
|
ETag:<span class="w"> </span>etag
|
|
Content-Length:<span class="w"> </span>length
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>request-id
|
|
x-obs-id-2:<span class="w"> </span>id
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0092__section8271421124512"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0092__p1512332591013">The response to the request uses common headers. For details, see <a href="obs_04_0013.html#obs_04_0013__d0e686">Table 1</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0092__section16332845"><h4 class="sectiontitle">Response Elements</h4><p class="msonormal" id="obs_04_0092__p24646447">This response involves no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0092__section12777878"><h4 class="sectiontitle">Error Responses</h4><p class="msonormal" id="obs_04_0092__p50205220">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_0092__section11686111817239"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="obs_04_0092__screen1249964665316">PUT /ObjectName?modify&position=Position HTTP/1.1
|
|
Host: examplebucket.obs.<em id="obs_04_0092__i12367117502">region</em>.example.com
|
|
Date: Wed, 08 Jul 2015 06:57:01 GMT
|
|
Content-Type: image/jpg
|
|
Content-Length: 1458
|
|
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:kZoYNv66bsmc10+dcGKw5x2PRrk=
|
|
|
|
[1458 bytes of object data]</pre>
|
|
</div>
|
|
<div class="section" id="obs_04_0092__section6687115054912"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0092__screen314017410502"><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></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200
|
|
Date:<span class="w"> </span>Wed,<span class="w"> </span>08<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>06:57:02<span class="w"> </span>GMT
|
|
ETag:<span class="w"> </span>"d41d8cd98f00b204e9800998ecf8427e"
|
|
Content-Length:<span class="w"> </span>0
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>8DF400000163D3F0FD2A03D2D30B0542
|
|
x-obs-id-2:<span class="w"> </span>32AAAUgAIAABAAAQAAEAABAAAQAAEAABCTjCqTmsA1XRpIrmrJdvcEWvZyjbztd
|
|
</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>
|
|
|