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>
312 lines
33 KiB
HTML
312 lines
33 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 a multipart upload task is created, you can upload parts for this task using the obtained multipart upload ID. 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 successful only based on the <strong id="obs_04_0100__b1439410341502">status_code</strong> in the returned HTTP header. If <strong id="obs_04_0100__b7394133417504">200</strong> is returned for <strong id="obs_04_0100__b2394183411509">status_code</strong>, the server has received the request and started to process the request. The copy is successful only when the body in the response contains ETag.</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&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 the encryption algorithm for the part copy when SSE-C is used.</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 the key for encrypting the part copy when SSE-C is used.</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 the key for encrypting the part copy when SSE-C is used. 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 the algorithm for the source object when SSE-C is used.</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 key for decrypting the source object when SSE-C is used.</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 for the source object when SSE-C is used. 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>
|
|
<tr id="obs_04_0100__row125391491146"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p55563613">x-obs-copy-source-if-match</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p4358836">Indicates that the source object is copied only if its ETag matches the one specified in this header. Otherwise, a 412 status code (failed precondition) is returned.</p>
|
|
<p id="obs_04_0100__p39229524">Type: string</p>
|
|
<p id="obs_04_0100__p17521398">Example: <strong id="obs_04_0100__b4428143852812">x-obs-copy-source-if-match: etag</strong></p>
|
|
<p id="obs_04_0100__p23474860">Constraint: This header can be used with <strong id="obs_04_0100__b205431859172814">x-obs-copy-source-if-unmodified-since</strong> but not other conditional copy headers.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p22415484">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0100__row19516171021511"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p33434329">x-obs-copy-source-if-none-match</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p23826142">Indicates that the source object is copied only if its ETag does not match the one specified in this header. Otherwise, a 412 status code (failed precondition) is returned.</p>
|
|
<p id="obs_04_0100__p13108688">Type: string</p>
|
|
<p id="obs_04_0100__p50869335">Example: <strong id="obs_04_0100__b41641826153018">x-obs-copy-source-if-none-match: etag</strong></p>
|
|
<p id="obs_04_0100__p55170835">Constraint: This header can be used with <strong id="obs_04_0100__b04121332133014">x-obs-copy-source-if-modified-since</strong> but not other conditional copy headers.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p39652630">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0100__row16193201421517"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p49955853">x-obs-copy-source-if-unmodified-since</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p19892329">Indicates that the source object is copied only if it has not been modified since the time specified by this header. Otherwise, a 412 status code (failed precondition) is returned. This header can be used with <strong id="obs_04_0100__b1449495410302">x-obs-copy-source-if-match</strong> but not other conditional copy headers.</p>
|
|
<p id="obs_04_0100__p44813233">Type: string</p>
|
|
<p id="obs_04_0100__p7842432181619">Format: HTTP time string complying with the format specified at <strong id="obs_04_0100__b240012211333">http://www.ietf.org/rfc/rfc2616.txt</strong>, which can be any of the following:</p>
|
|
<ol id="obs_04_0100__ol02590473167"><li id="obs_04_0100__li14259134712162"><strong id="obs_04_0100__b18379254193417">EEE, dd MMM yyyy HH:mm:ss z</strong></li><li id="obs_04_0100__li1326017473168"><strong id="obs_04_0100__b10250135963418">EEEE, dd-MMM-yy HH:mm:ss z</strong></li><li id="obs_04_0100__li18260347181610"><strong id="obs_04_0100__b320894183515">EEE MMM dd HH:mm:ss yyyy</strong></li></ol>
|
|
<p id="obs_04_0100__p614810111413">Examples:</p>
|
|
<ol id="obs_04_0100__ol15822094117"><li id="obs_04_0100__li17815209415"><strong id="obs_04_0100__b039213107359">x-obs-copy-source-if-unmodified-since: Sun, 06 Nov 1994 08:49:37 GMT</strong></li><li id="obs_04_0100__li1081620184112"><strong id="obs_04_0100__b5752101418358">x-obs-copy-source-if-unmodified-since: Sunday, 06-Nov-94 08:49:37 GMT</strong></li><li id="obs_04_0100__li9892014414"><strong id="obs_04_0100__b62861019163510">x-obs-copy-source-if-unmodified-since: Sun Nov 6 08:49:37 1994</strong></li></ol>
|
|
<p id="obs_04_0100__p144291819194015">Constraint: The time specified by this header cannot be later than the current server time (GMT time), or this header does not take effect.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p53939580">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0100__row1433612176157"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0100__p63269042">x-obs-copy-source-if-modified-since</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0100__p24518744">Indicates that the source object is copied only if it has been modified since the time specified by this header. Otherwise, a 412 status code (failed precondition) is returned. This header can be used with <strong id="obs_04_0100__b7791641163514">x-obs-copy-source-if-none-match</strong> but not other conditional copy headers.</p>
|
|
<p id="obs_04_0100__p19342108">Type: string</p>
|
|
<p id="obs_04_0100__p68321613174320">Format: HTTP time string complying with the format specified at <strong id="obs_04_0100__b1997093313362">http://www.ietf.org/rfc/rfc2616.txt</strong>, which can be any of the following:</p>
|
|
<ol id="obs_04_0100__ol13832813144310"><li id="obs_04_0100__li383271334313"><strong id="obs_04_0100__b11157135563414">EEE, dd MMM yyyy HH:mm:ss z</strong></li><li id="obs_04_0100__li15832141314319"><strong id="obs_04_0100__b17992959153411">EEEE, dd-MMM-yy HH:mm:ss z</strong></li><li id="obs_04_0100__li19832101318434"><strong id="obs_04_0100__b04025183512">EEE MMM dd HH:mm:ss yyyy</strong></li></ol>
|
|
<p id="obs_04_0100__p883281314316">Examples:</p>
|
|
<ol id="obs_04_0100__ol1832713114315"><li id="obs_04_0100__li583218135434"><strong id="obs_04_0100__b1788419419366">x-obs-copy-source-if-unmodified-since: Sun, 06 Nov 1994 08:49:37 GMT</strong></li><li id="obs_04_0100__li983221374317"><strong id="obs_04_0100__b56431343153613">x-obs-copy-source-if-unmodified-since: Sunday, 06-Nov-94 08:49:37 GMT</strong></li><li id="obs_04_0100__li188321913144312"><strong id="obs_04_0100__b1931216458362">x-obs-copy-source-if-unmodified-since: Sun Nov 6 08:49:37 1994</strong></li></ol>
|
|
<p id="obs_04_0100__p033575519130">Constraint: The time specified by this header cannot be later than the current server time (GMT time), or this header does not take effect.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0100__p7535566">No</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>
|
|
|
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<CopyPartResult xmlns="http://obs.<em id="obs_04_0100__i686862242120">region</em>.example.com/doc/2015-06-30/">
|
|
<LastModified><em id="obs_04_0100__i52549899">modifiedDate</em></LastModified>
|
|
<ETag><em id="obs_04_0100__i28683449">etag</em></ETag>
|
|
</CopyPartResult></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__p1753512571813"><strong id="obs_04_0100__b169662810418">Explanation</strong>:</p>
|
|
<p id="obs_04_0100__p205358571889">ID of a specified key used for SSE-KMS encryption.</p>
|
|
<p id="obs_04_0100__p135361957886"><strong id="obs_04_0100__b158189541025">Restrictions</strong>:</p>
|
|
<p id="obs_04_0100__p153618578818">This header can only be used when you specify <strong id="obs_04_0100__b21015331045">kms</strong> for the <strong id="obs_04_0100__b2010115334417">x-obs-server-side-encryption</strong> header.</p>
|
|
<p id="obs_04_0100__p11536557683"><strong id="obs_04_0100__b20745734045">Default value</strong>:</p>
|
|
<p id="obs_04_0100__p17536857783">If you specify <strong id="obs_04_0100__b273515635111">kms</strong> for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.</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 the encryption algorithm. This header is included in a response when 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 the key for encrypting objects. This header is included in a response when 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&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"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
|
|
<span class="nt"><CopyPartResult</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="w"> </span><span class="nt"><LastModified></span>2015-07-01T05:16:32.344Z<span class="nt"></LastModified></span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>"3b46eaf02d3b6b1206078bb86a7b7013"<span class="nt"></ETag></span>
|
|
<span class="nt"></CopyPartResult></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>
|
|
|