doc-exports/docs/obs/api-ref/obs_04_0100.html
zhangyue d5b1108742 OBS API DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2023-10-16 12:27:49 +00:00

266 lines
28 KiB
HTML

<a name="obs_04_0100"></a><a name="obs_04_0100"></a>
<h1 class="topictitle1">Copying Parts</h1>
<div id="body20741762"><div class="section" id="obs_04_0100__section5584184924715"><h4 class="sectiontitle">Functions</h4><p class="msonormal" id="obs_04_0100__p28787755">After creating a multipart upload job, you can specify its upload ID and upload a part to the job in OBS. Alternatively, you can make an API call to add a part (part of an object or the whole object).</p>
<p class="msonormal" id="obs_04_0100__p57763204">This operation supports server-side encryption.</p>
<div class="notice" id="obs_04_0100__note48307965"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p class="cautiontext" id="obs_04_0100__p52458133">You cannot determine whether a request is executed successfully only using <strong id="obs_04_0100__b733137133204115">status_code</strong> in the returned HTTP header. If 200 in <strong id="obs_04_0100__b1634619502204120">status_code</strong> is returned, the server has received the request and starts to process the request. The body in the response shows whether the request is executed successfully. The request is executed successfully only when the body contains Etag; otherwise, the request fails to be executed.</p>
</div></div>
<p class="cautiontext" id="obs_04_0100__p32118502">Copy the source object and save it as <strong id="obs_04_0100__b1449910188292">part1</strong>. If a <strong id="obs_04_0100__b10351735162916">part1</strong> already exists before the copying, the original <strong id="obs_04_0100__b8516114819293">part1</strong> will be overwritten by the newly copied <strong id="obs_04_0100__b45591547316">part1</strong>. After the copy is successful, only the latest <strong id="obs_04_0100__b8996122103115">part1</strong> is displayed. The old <strong id="obs_04_0100__b2061133813112">part1</strong> data will be deleted. Therefore, ensure that the target part does not exist or has no value when using the part copy operation. Otherwise, data may be deleted by mistake. The source object in the copy process does not change.</p>
</div>
<div class="section" id="obs_04_0100__section20631062"><h4 class="sectiontitle">Cold Objects</h4><p class="msonormal" id="obs_04_0100__p21250418">If source objects are in the Cold storage class, ensure that these objects have been restored before you copy them. If the source object is not restored or is being restored, the copy fails and error <strong id="obs_04_0100__b469082335">403 Forbidden</strong> is returned. The fault is described as follows:</p>
<p class="msonormal" id="obs_04_0100__p57036037">ErrorCode: InvalidObjectState</p>
<p class="msonormal" id="obs_04_0100__p43562287">ErrorMessage: Operation is not valid for the source object's storage class</p>
</div>
<div class="section" id="obs_04_0100__section51461830"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="obs_04_0100__screen2829544181517">PUT /ObjectName?partNumber=partNum&amp;uploadId=UploadID HTTP/1.1
Host: <em id="obs_04_0100__i123441746202313">bucketname</em>.obs.<em id="obs_04_0100__i034434682311">region</em>.example.com
Date: <em id="obs_04_0100__i39367096">date</em>
x-obs-copy-source: <em id="obs_04_0100__i34618247">sourceobject</em>
x-obs-copy-source-range:bytes=<em id="obs_04_0100__i52614655">start-end</em>
Authorization: <em id="obs_04_0100__i33928647">authorization</em>
Content-Length: <em id="obs_04_0100__i63865863">length</em></pre>
</div>
<div class="section" id="obs_04_0100__section60503287"><h4 class="sectiontitle">Request Parameters</h4><p class="msonormal" id="obs_04_0100__p5752424">To copy a part, you need to specify the part number of the target part and the multipart upload task number. <a href="#obs_04_0100__table12334196">Table 1</a> describes the parameters.</p>
<div class="tablenoborder"><a name="obs_04_0100__table12334196"></a><a name="table12334196"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0100__table12334196" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="obs_04_0100__row62139994"><th align="left" class="cellrowborder" valign="top" width="24.240000000000002%" id="mcps1.3.4.3.2.4.1.1"><p id="obs_04_0100__p174736">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.57%" id="mcps1.3.4.3.2.4.1.2"><p id="obs_04_0100__p60274364">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.189999999999998%" id="mcps1.3.4.3.2.4.1.3"><p id="obs_04_0100__p50814927">Mandatory</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0100__row67098381"><td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_04_0100__p66259747">partNumber</p>
</td>
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_04_0100__p65439290">Indicates the ID of a part to be uploaded.</p>
<p id="obs_04_0100__p52082701">Type: integer</p>
</td>
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_04_0100__p57949256">Yes</p>
</td>
</tr>
<tr id="obs_04_0100__row51781257"><td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.4.3.2.4.1.1 "><p id="obs_04_0100__p33532306">uploadId</p>
</td>
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.4.3.2.4.1.2 "><p id="obs_04_0100__p31762235">Indicates a multipart upload ID.</p>
<p id="obs_04_0100__p17424659">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.4.3.2.4.1.3 "><p id="obs_04_0100__p2111247">Yes</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0100__section7658674"><h4 class="sectiontitle">Request Headers</h4><p class="msonormal" id="obs_04_0100__p36793344">In addition the common message headers, the request uses two extended headers. <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a> describes the common message header.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0100__table27470926" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request headers</caption><thead align="left"><tr id="obs_04_0100__row11414663"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.3.2.4.1.1"><p id="obs_04_0100__p52172500">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.3.2.4.1.2"><p id="obs_04_0100__p50135671">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.3.2.4.1.3"><p id="obs_04_0100__p41682189">Mandatory</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0100__row53109972"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p6940438">x-obs-copy-source</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p25304621">Indicates the source object to be copied.</p>
<p id="obs_04_0100__p26415004">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p59240589">Yes</p>
</td>
</tr>
<tr id="obs_04_0100__row63403257"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p35390206">x-obs-copy-source-range</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p48034423">Indicates the range of bytes (start - end) to be copied from the source object. <strong id="obs_04_0100__b1589637549172239">start</strong> indicates the start byte of the part to be copied and <strong id="obs_04_0100__b522401148172239">end</strong> indicates the end byte.</p>
<p id="obs_04_0100__p29656627">Type: integer</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p53376566">No</p>
</td>
</tr>
<tr id="obs_04_0100__row10627047"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p55484461">x-obs-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p65056393">Indicates an algorithm used to encrypt a destination part. The header is used in SSE-C mode.</p>
<p id="obs_04_0100__p48636625">Type: string</p>
<p id="obs_04_0100__p35076448">Example: <strong id="obs_04_0100__b3360103811109">x-obs-server-side-encryption-customer-algorithm:AES256</strong></p>
<p id="obs_04_0100__p47252582">Constraint: This header must be used together with <strong id="obs_04_0100__b344755101217">x-obs-server-side-encryption-customer-key</strong> and <strong id="obs_04_0100__b2045410519129">x-obs-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p2253956">No. This header is required when SSE-C is used. The encryption algorithm must be the same as that used to initiate multipart upload tasks.</p>
</td>
</tr>
<tr id="obs_04_0100__row20285605"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p32521314">x-obs-server-side-encryption-customer-key</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p16980796">Indicates a key used to encrypt a destination part. The header is used in SSE-C mode. This key is used to encrypt objects.</p>
<p id="obs_04_0100__p18609439">Type: string</p>
<p id="obs_04_0100__p33267226">Example: <strong id="obs_04_0100__b10113443121015">x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=</strong></p>
<p id="obs_04_0100__p30969582">Constraint: This header is a Base64-encoded 256-bit key and must be used together with <strong id="obs_04_0100__b19202118143518">x-obs-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0100__b1920318813513">x-obs-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p25508238">No. This header is required when SSE-C is used. The key must be the same as that used to initiate multipart upload tasks.</p>
</td>
</tr>
<tr id="obs_04_0100__row28247556"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p6350688">x-obs-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p44643680">Indicates the MD5 value of a key used to encrypt a destination part. The header is used in SSE-C mode. The MD5 value is used to check whether any error occurs during the transmission of the key. </p>
<p id="obs_04_0100__p66248801">Type: string</p>
<p id="obs_04_0100__p59368300">Example: <strong id="obs_04_0100__b121111249141016">x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
<p id="obs_04_0100__p64552659">Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with <strong id="obs_04_0100__b551216214116">x-obs-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0100__b1351852513">x-obs-server-side-encryption-customer-key</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p61382877">No. This header is required when SSE-C is used. The MD5 value must be the same as that used to initiate multipart upload tasks.</p>
</td>
</tr>
<tr id="obs_04_0100__row15574987"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p53614445">x-obs-copy-source-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p47802812">Indicates an algorithm used by a source object. The header is used in SSE-C mode.</p>
<p id="obs_04_0100__p27572127">Type: string</p>
<p id="obs_04_0100__p46822559">Example: <strong id="obs_04_0100__b14559113619118">x-obs-copy-source-server-side-encryption-customer-algorithm:AES256</strong></p>
<p id="obs_04_0100__p18749852">Constraint: This header must be used together with <strong id="obs_04_0100__b442602933518">x-obs-copy-source-server-side-encryption-customer-key</strong> and <strong id="obs_04_0100__b19427192933518">x-obs-copy-source-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p42343033">No. This header is required when SSE-C is used to copy a source object.</p>
</td>
</tr>
<tr id="obs_04_0100__row45542979"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p65102676">x-obs-copy-source-server-side-encryption-customer-key</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p38825369">Indicates the algorithm used to decrypt a source object. The header is used in SSE-C mode.</p>
<p id="obs_04_0100__p13884002">Type: string</p>
<p id="obs_04_0100__p57847162">Example: <strong id="obs_04_0100__b163154011111">x-obs-copy-source-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=</strong></p>
<p id="obs_04_0100__p50862417">Constraint: This header is a Base64-encoded 256-bit key and must be used together with <strong id="obs_04_0100__b1419193963517">x-obs-copy-source-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0100__b842053918359">x-obs-copy-source-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p26215145">No. This header is required when SSE-C is used to copy a source object.</p>
</td>
</tr>
<tr id="obs_04_0100__row34609715"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p51923546">x-obs-copy-source-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p45057726">Indicates the MD5 value of the key used for the source object. The header is used in SSE-C mode. The MD5 value is used to check whether any error occurs during the transmission of the key. </p>
<p id="obs_04_0100__p2866354">Type: string</p>
<p id="obs_04_0100__p25797190">Example: <strong id="obs_04_0100__b1863124413119">x-obs-copy-source-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
<p id="obs_04_0100__p30848123">Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with <strong id="obs_04_0100__b7714914117">x-obs-copy-source-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0100__b1775913114">x-obs-copy-source-server-side-encryption-customer-key</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p15670069">No. This header is required when SSE-C is used to copy a source object.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0100__section1819209"><h4 class="sectiontitle">Request Elements</h4><p class="msonormal" id="obs_04_0100__p61316104">This request involves no elements.</p>
</div>
<div class="section" id="obs_04_0100__section16372883"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="obs_04_0100__screen56824450">HTTP/1.1 <em id="obs_04_0100__i4936564">status_code</em>
Date: <em id="obs_04_0100__i64317386">date</em>
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;CopyPartResult xmlns="http://obs.<em id="obs_04_0100__i686862242120">region</em>.example.com/doc/2015-06-30/"&gt;
&lt;LastModified&gt;<em id="obs_04_0100__i52549899">modifiedDate</em>&lt;/LastModified&gt;
&lt;ETag&gt;<em id="obs_04_0100__i28683449">etag</em>&lt;/ETag&gt;
&lt;/CopyPartResult&gt;</pre>
</div>
<div class="section" id="obs_04_0100__section13138227"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0100__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 class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0100__table35480633" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Additional response headers</caption><thead align="left"><tr id="obs_04_0100__row17328945"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.8.3.2.3.1.1"><p id="obs_04_0100__p61467293">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.8.3.2.3.1.2"><p id="obs_04_0100__p12794797">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0100__row29745609"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0100__p60584154">x-obs-server-side-encryption</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0100__p8369480">This header is included in a response if SSE-KMS is used. </p>
<p id="obs_04_0100__p8216461">Type: string</p>
<p id="obs_04_0100__p6839290">Example: <strong id="obs_04_0100__b194372894112">x-obs-server-side-encryption:kms</strong></p>
</td>
</tr>
<tr id="obs_04_0100__row61553617"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0100__p19787044">x-obs-server-side-encryption-kms-key-id</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0100__p59246769">Indicates the master key ID. This header is included in a response if SSE-KMS is used. </p>
<p id="obs_04_0100__p3184191118373">Type: string</p>
<p id="obs_04_0100__p816033935117">Format: <em id="obs_04_0100__i2412844957">regionID</em><strong id="obs_04_0100__b941815441856">:</strong><em id="obs_04_0100__i1141844410511">domainID</em><strong id="obs_04_0100__b174181044759">:key/</strong><em id="obs_04_0100__i541916441754">key_id</em></p>
<p id="obs_04_0100__p91841311103713"><em id="obs_04_0100__i1023610453586">regionID</em> indicates the ID of the region where the key belongs. <em id="obs_04_0100__i152368456583">domainID</em> indicates the ID of the tenant where the key belongs. <em id="obs_04_0100__i1237134515812">key_id</em> indicates the key ID used in this encryption.</p>
<p id="obs_04_0100__p53578586588">Example: <strong id="obs_04_0100__b15620125112010">x-obs-server-side-encryption-kms-key-id:</strong><strong id="obs_04_0100__b1162135117014"><em id="obs_04_0100__i46201651104">region</em></strong><strong id="obs_04_0100__b1762218514016">:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</strong></p>
</td>
</tr>
<tr id="obs_04_0100__row34258974"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0100__p23513491">x-obs-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0100__p25544633">Indicates an encryption algorithm. This header is included in a response if SSE-C is used. </p>
<p id="obs_04_0100__p28575110">Type: string</p>
<p id="obs_04_0100__p55849399">Example: <strong id="obs_04_0100__b3690134514410">x-obs-server-side-encryption-customer-algorithm:AES256</strong></p>
</td>
</tr>
<tr id="obs_04_0100__row32882551"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.8.3.2.3.1.1 "><p id="obs_04_0100__p46241006">x-obs-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.8.3.2.3.1.2 "><p id="obs_04_0100__p54533968">Indicates the MD5 value of a key used to encrypt objects. This header is included in a response if SSE-C is used. </p>
<p id="obs_04_0100__p21043670">Type: string</p>
<p id="obs_04_0100__p55175303">Example: <strong id="obs_04_0100__b42135114110">x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0100__section51135185"><h4 class="sectiontitle">Response Elements</h4><p class="msonormal" id="obs_04_0100__p40014587">This response contains elements of a part copy result. <a href="#obs_04_0100__table44628158">Table 4</a> describes the elements.</p>
<div class="tablenoborder"><a name="obs_04_0100__table44628158"></a><a name="table44628158"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0100__table44628158" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response elements</caption><thead align="left"><tr id="obs_04_0100__row15848135"><th align="left" class="cellrowborder" valign="top" width="30.3%" id="mcps1.3.9.3.2.3.1.1"><p id="obs_04_0100__p8630529">Element</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="69.69999999999999%" id="mcps1.3.9.3.2.3.1.2"><p id="obs_04_0100__p50531495">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0100__row61802714"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0100__p39963958">LastModified</p>
</td>
<td class="cellrowborder" valign="top" width="69.69999999999999%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0100__p15855199">Indicates the latest time an object was modified.</p>
<p id="obs_04_0100__p8479068">Type: string</p>
</td>
</tr>
<tr id="obs_04_0100__row9202748"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.9.3.2.3.1.1 "><p id="obs_04_0100__p7225142">ETag</p>
</td>
<td class="cellrowborder" valign="top" width="69.69999999999999%" headers="mcps1.3.9.3.2.3.1.2 "><p id="obs_04_0100__p48365620">ETag value of the target part. It is the unique identifier of the part content and is used to verify data consistency when merging parts.</p>
<p id="obs_04_0100__p32637400">Type: string</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0100__section57563486"><h4 class="sectiontitle">Error Responses</h4><ol id="obs_04_0100__ol14918133531115"><li class="msonormal" id="obs_04_0100__li143715391111">If the AK or signature is invalid, OBS returns <strong id="obs_04_0100__b13857289379">403 Forbidden</strong> and the error code is <strong id="obs_04_0100__b1549016151375">AccessDenied</strong>.</li><li class="msonormal" id="obs_04_0100__li158754112111">Check whether the source bucket or destination bucket exists. If the source bucket or destination bucket does not exist, OBS returns <strong id="obs_04_0100__b2534175712378">404 Not Found</strong> and the error code is <strong id="obs_04_0100__b1698114153810">NoSuchBucket</strong>.</li><li class="msonormal" id="obs_04_0100__li281111444112">If the source object does not exist, OBS returns <strong id="obs_04_0100__b18158151893818">404 Not Found</strong> and the error code is <strong id="obs_04_0100__b11297192463813">NoSuchKey</strong>.</li><li class="msonormal" id="obs_04_0100__li14174047181111">If the user does not have the read permission for the specified object, OBS returns <strong id="obs_04_0100__b543718491384">403 Forbidden</strong> and the error code is <strong id="obs_04_0100__b4394153183810">AccessDenied</strong>.</li><li class="msonormal" id="obs_04_0100__li1643504912113">If the user does not have the write permission for the destination bucket, OBS returns <strong id="obs_04_0100__b771251083913">403 Forbidden</strong> and the error code is <strong id="obs_04_0100__b19539171410396">AccessDenied</strong>.</li><li class="msonormal" id="obs_04_0100__li1689725115114">If the specified task does not exist, OBS returns <strong id="obs_04_0100__b6222142912399">404 Not Found</strong> and the error code is <strong id="obs_04_0100__b11745432173919">NoSuchUpload</strong>.</li><li class="msonormal" id="obs_04_0100__li434015413119">If the user is not the initiator of the multipart upload task, OBS returns <strong id="obs_04_0100__b22981502392">403 Forbidden</strong> and the error code is <strong id="obs_04_0100__b1563845611399">AccessDenied</strong>.</li><li class="msonormal" id="obs_04_0100__li20493175711118">When the size of a copied part has exceeded 5 GB, OBS returns <strong id="obs_04_0100__b0315822174018">400 Bad Request</strong>.</li><li class="msonormal" id="obs_04_0100__li12918103541113">If a part number is not within the range from 1 to 10000, OBS returns error code <strong id="obs_04_0100__b19209154115">400 Bad Request</strong>.</li></ol>
<p class="msonormal" id="obs_04_0100__p41410119">Other errors are included in <a href="obs_04_0115.html#obs_04_0115__d0e843">Table 2</a>.</p>
</div>
<div class="section" id="obs_04_0100__section769217299471"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="obs_04_0100__screen1929653364712">PUT /tobject02?partNumber=2&amp;uploadId=00000163D40171ED8DF4050919BD02B8 HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.<em id="obs_04_0100__i12367117502">region</em>.example.com
Accept: */*
Date: WED, 01 Jul 2015 05:16:32 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:dSnpnNpawDSsLg/xXxaqFzrAmMw=
x-obs-copy-source: /destbucket/object01</pre>
</div>
<div class="section" id="obs_04_0100__section19513161325312"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0100__screen7534121318539"><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>
<span class="normal">11</span>
<span class="normal">12</span>
<span class="normal">13</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>8DF400000163D40ABBD20405D30B0542
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABAAAQAAEAABAAAQAAEAABCTIJpD2efLy5o8sTTComwBb2He0j11Ne
Content-Type:<span class="w"> </span>application/xml
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>05:16:32<span class="w"> </span>GMT
Transfer-Encoding:<span class="w"> </span>chunked
<span class="cp">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;</span>
<span class="nt">&lt;CopyPartResult</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">&quot;http://obs.example.com/doc/2015-06-30/&quot;</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;LastModified&gt;</span>2015-07-01T05:16:32.344Z<span class="nt">&lt;/LastModified&gt;</span>
<span class="w"> </span><span class="nt">&lt;ETag&gt;</span>&quot;3b46eaf02d3b6b1206078bb86a7b7013&quot;<span class="nt">&lt;/ETag&gt;</span>
<span class="nt">&lt;/CopyPartResult&gt;</span>
</pre></div></td></tr></table></div>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0096.html">Operations on Multipart Upload</a></div>
</div>
</div>