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>
525 lines
53 KiB
HTML
525 lines
53 KiB
HTML
<a name="obs_04_0082"></a><a name="obs_04_0082"></a>
|
|
|
|
<h1 class="topictitle1">Copying Objects</h1>
|
|
<div id="body61435126"><div class="section" id="obs_04_0082__section5584184924715"><h4 class="sectiontitle">Functions</h4><p class="msonormal" id="obs_04_0082__p39464956">You can perform this operation to create a copy of an existing object in OBS.</p>
|
|
<p class="msonormal" id="obs_04_0082__p19640290">Users can determine whether to copy the metadata of the source object to the target object (by default) or replace the metadata of the target object with the metadata contained in the request. The ACL of the source object is not copied to the target object. By default, the ACL of the target object is private. You can set an ACL for the target object by sending an API request.</p>
|
|
<p class="msonormal" id="obs_04_0082__p42544890">The request for copying an object needs to carry the information about the bucket and object to be copied in the header field. The message body cannot be carried.</p>
|
|
<p class="msonormal" id="obs_04_0082__p47359691">This operation supports server-side encryption.</p>
|
|
<p id="obs_04_0082__p9615112319534">An object copy can be up to 5 GB in size. If the source object size exceeds 5 GB, you can only <a href="obs_04_0100.html">copy part of the object</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section23584040"><h4 class="sectiontitle">Versioning</h4><p class="msonormal" id="obs_04_0082__p10189271">By default, <strong id="obs_04_0082__b48514746">x-obs-copy-source</strong> specifies the latest version of the source object. If the latest version of the source object has a deletion marker, the object is considered to have been deleted. You can add <strong id="obs_04_0082__b33979533">versionId</strong> to request header <strong id="obs_04_0082__b37380344">x-obs-copy-source</strong> to copy an object with the specified version ID.</p>
|
|
<p class="msonormal" id="obs_04_0082__p24594578">If a bucket has versioning enabled, the system automatically generates a unique version ID for the requested object in this bucket and returns the version ID in response header <strong id="obs_04_0082__b7909027">x-obs-version-id</strong>. If versioning is suspended for the bucket, the object version ID is <strong id="obs_04_0082__b6348185161214">null</strong>.</p>
|
|
<div class="notice" id="obs_04_0082__note11381267"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p class="cautiontext" id="obs_04_0082__p35322545">When the bucket versioning status is disabled, if you make a copy of object_A and save it as object_B, and an object named as object_B already exists, the new object_B will overwrite the existing one. After the copying is executed successfully, only new object_B can be downloaded because old object_B has been deleted. Therefore, before copying an object, ensure that there is no object with the same name as the object copy to prevent data from being deleted mistakenly. During the copying, object_A has no changes. </p>
|
|
</div></div>
|
|
<p class="cautiontext" id="obs_04_0082__p49467454">You cannot determine whether a request is executed successfully only using <strong id="obs_04_0082__b733137133204115">status_code</strong> in the header returned by HTTP. If 200 in <strong id="obs_04_0082__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 copy succeeds. If the body contains ETag, the copy succeeds. Otherwise, the copy failed.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section1475721115541"><h4 class="sectiontitle">WORM</h4><p id="obs_04_0082__p134973436414">If a bucket has WORM enabled, you can configure retention policies for objects in the bucket. You can specify the <strong id="obs_04_0082__b16286138101016">x-obs-object-lock-mode</strong> and <strong id="obs_04_0082__b142863861017">x-obs-object-lock-retain-until-date</strong> headers to configure a retention policy when you copy an object. If you do not specify these two headers but have configured a default bucket-level WORM policy, this default policy automatically applies to the object newly copied. You can also configure or update a WORM retention policy after an object is copied to the bucket.</p>
|
|
<div class="note" id="obs_04_0082__note7241205112419"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_04_0082__p724113511418">In a copy operation, the object protection status is not copied, so the protection status of an object copy is independent of that of the source object. After the copy is complete, WORM retention changes made on the source object does not affect the object copy.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section10929768"><h4 class="sectiontitle">Cold Objects</h4><p class="msonormal" id="obs_04_0082__p47440850">If source objects are in the Cold storage class, ensure that these objects have been restored before you copy them. If a source object is not restored or is being restored, its copy will fail and error <strong id="obs_04_0082__b1525193074015">403 Forbidden</strong> will be returned. The fault is described as follows:</p>
|
|
<p class="msonormal" id="obs_04_0082__p24314466">ErrorCode: InvalidObjectState</p>
|
|
<p class="msonormal" id="obs_04_0082__p17503605">ErrorMessage: Operation is not valid for the source object's storage class</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section31259054"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0082__screen53918951"><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>PUT<span class="w"> </span>/destinationObjectName<span class="w"> </span>HTTP/1.1<span class="w"> </span>
|
|
Host:<span class="w"> </span>bucketname.obs.region.example.com
|
|
x-obs-copy-source:<span class="w"> </span>/sourceBucket/sourceObject<span class="w"> </span>
|
|
x-obs-metadata-directive:<span class="w"> </span>metadata_directive
|
|
x-obs-copy-source-if-match:<span class="w"> </span>etag
|
|
x-obs-copy-source-if-none-match:<span class="w"> </span>etag
|
|
x-obs-copy-source-if-unmodified-since:<span class="w"> </span>time_stamp
|
|
x-obs-copy-source-if-modified-since:<span class="w"> </span>time_stamp
|
|
Authorization:<span class="w"> </span>signature
|
|
Date:<span class="w"> </span>date
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section12896034"><h4 class="sectiontitle">Request Parameters</h4><p class="msonormal" id="obs_04_0082__p48230284">This request contains no message parameters.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section48955445"><h4 class="sectiontitle">Request Headers</h4><p class="msonormal" id="obs_04_0082__p14338945">You can add optional headers to specify the object to be copied. <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a> describes the optional headers.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0082__table20603882" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request headers</caption><thead align="left"><tr id="obs_04_0082__row42074616"><th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.7.3.2.4.1.1"><p id="obs_04_0082__p52600732">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="62%" id="mcps1.3.7.3.2.4.1.2"><p id="obs_04_0082__p26772911">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.7.3.2.4.1.3"><p id="obs_04_0082__p55882221">Mandatory</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0082__row3058719"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p46429677">x-obs-acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p227785144918">This header can be added to set access control policies for objects when copying the objects. The access control policies are the predefined common policies, including <strong id="obs_04_0082__b842352706163347">private</strong>, <strong id="obs_04_0082__b842352706163352">public-read</strong>, <strong id="obs_04_0082__b842352706163357">public-read-write</strong>.</p>
|
|
<p id="obs_04_0082__p24367465">Type: string</p>
|
|
<p id="obs_04_0082__p17980599">Example: <strong id="obs_04_0082__b183885920497">x-obs-acl: acl</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p47142403">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row851631133110"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p54102201376">x-obs-grant-read</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p1041152010375">When creating an object, you can use this header to grant all users in an account the permissions to read the object and obtain the object metadata.</p>
|
|
<p id="obs_04_0082__p036992924111">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p341182017372">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row939418437156"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p2784192993712">x-obs-grant-read-acp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p6913194219811">When creating an object, you can use this header to grant all users in an account the permission to obtain the object ACL.</p>
|
|
<p id="obs_04_0082__p49151332194119">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p9785429153711">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row1419914681518"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p4151526163710">x-obs-grant-write-acp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p94031856283">When creating an object, you can use this header to grant all users in an account the permission to write the object ACL.</p>
|
|
<p id="obs_04_0082__p79212366417">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p1316182618370">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row430019515158"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p3389132314376">x-obs-grant-full-control</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p1914315101898">When creating an object, you can use this header to grant all users in an account the permissions to read the object, obtain the object metadata and ACL, and write the object ACL.</p>
|
|
<p id="obs_04_0082__p1284513399419">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p12389102314371">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row21628443"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p7073420">x-obs-copy-source</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p36076142">Indicates names of the source bucket and the source object. If the source object has multiple versions, the versionId parameter can be used to specify the desired version.</p>
|
|
<p id="obs_04_0082__p56249824">Type: string</p>
|
|
<p id="obs_04_0082__p1619935102619">Constraint: URL encoding is required for handling full-width characters and %.</p>
|
|
<p id="obs_04_0082__p36486376">Example: <strong id="obs_04_0082__b1381171354917">x-obs-copy-source: /source_bucket/sourceObject</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p2606499">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row23458496"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p21090047">x-obs-metadata- directive</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p30572242">Indicates whether the metadata of the target object is copied from the source object or replaced with the metadata contained in the request.</p>
|
|
<p id="obs_04_0082__p6714727">Type: string</p>
|
|
<p id="obs_04_0082__p60432546">Valid values: COPY and REPLACE</p>
|
|
<p id="obs_04_0082__p7022004">Default value: COPY</p>
|
|
<p id="obs_04_0082__p63198038">Example: <strong id="obs_04_0082__b439081884913">x-obs-metadata-directive: metadata_directive</strong></p>
|
|
<p id="obs_04_0082__p31911433">Constraints: Values other than <strong id="obs_04_0082__b12705181714252">COPY</strong> or <strong id="obs_04_0082__b1271051716251">REPLACE</strong> result in an immediate 400-based error response. If you need to modify the metadata (the same for both the source and target objects), this parameter must be set to <strong id="obs_04_0082__b471061752517">REPLACE</strong>, otherwise, the request is invalid and the server returns a 400 HTTP status code error. This parameter cannot be used to change an encrypted object to a non-encrypted object (the same for both the source and target objects). If you use this parameter to change the encrypted object, the system returns 400.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p34689295">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row43768204"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p55563613">x-obs-copy-source-if-match</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p4358836">Copies the source object only if its ETag matches the one specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned.</p>
|
|
<p id="obs_04_0082__p39229524">Type: string</p>
|
|
<p id="obs_04_0082__p17521398">Example: <strong id="obs_04_0082__b8380152210495">x-obs-copy-source-if-match: etag</strong></p>
|
|
<p id="obs_04_0082__p23474860">Constraint: This parameter can be used with <strong id="obs_04_0082__b1789215718286">x-obs-copy-source-if-unmodified-since</strong> but not other conditional copy parameters.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p22415484">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row412769"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p33434329">x-obs-copy-source-if-none-match</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p23826142">Copies the object only if its ETag does not match the one specified in this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned.</p>
|
|
<p id="obs_04_0082__p13108688">Type: string</p>
|
|
<p id="obs_04_0082__p50869335">Example: <strong id="obs_04_0082__b5753172610494">x-obs-copy-source-if-none-match: etag</strong></p>
|
|
<p id="obs_04_0082__p55170835">Constraint: This parameter can be used with <strong id="obs_04_0082__b8567153014296">x-obs-copy-source-if-modified-since</strong> but not other conditional copy parameters.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p39652630">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row21329351"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p49955853">x-obs-copy-source-if-unmodified-since</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p19892329">Copies the source object only if it has not been modified since the time specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. This header can be used with <strong id="obs_04_0082__b195702434325">x-obs-copy-source-if-match</strong>, but cannot be used with other conditional copy headers.</p>
|
|
<p id="obs_04_0082__p44813233">Type: string</p>
|
|
<p id="obs_04_0082__p7842432181619">Format: HTTP time string complying with the format specified at <strong id="obs_04_0082__b17164103414179">http://www.ietf.org/rfc/rfc2616.txt</strong>, which can be any of the following:</p>
|
|
<ol id="obs_04_0082__ol02590473167"><li id="obs_04_0082__li14259134712162">EEE, dd MMM yyyy HH:mm:ss z</li><li id="obs_04_0082__li1326017473168">EEEE, dd-MMM-yy HH:mm:ss z</li><li id="obs_04_0082__li18260347181610">EEE MMM dd HH:mm:ss yyyy</li></ol>
|
|
<p id="obs_04_0082__p614810111413">Examples:</p>
|
|
<ol id="obs_04_0082__ol15822094117"><li id="obs_04_0082__li17815209415">x-obs-copy-source-if-unmodified-since: Sun, 06 Nov 1994 08:49:37 GMT</li><li id="obs_04_0082__li1081620184112">x-obs-copy-source-if-unmodified-since: Sunday, 06-Nov-94 08:49:37 GMT</li><li id="obs_04_0082__li9892014414">x-obs-copy-source-if-unmodified-since: Sun Nov 6 08:49:37 1994</li></ol>
|
|
<p id="obs_04_0082__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="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p53939580">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row15694180"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p63269042">x-obs-copy-source-if-modified-since</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p24518744">Copies the source object only if it has not been modified since the time specified by this header. Otherwise, a 412 HTTP status code error (failed precondition) is returned. This header can be used with <strong id="obs_04_0082__b755619493211">x-obs-copy-source-if-none-match</strong>, but cannot be used with other conditional copy headers</p>
|
|
<p id="obs_04_0082__p19342108">Type: string</p>
|
|
<p id="obs_04_0082__p68321613174320">Format: HTTP time string complying with the format specified at <strong id="obs_04_0082__b28261324184215">http://www.ietf.org/rfc/rfc2616.txt</strong>, which can be any of the following:</p>
|
|
<ol id="obs_04_0082__ol13832813144310"><li id="obs_04_0082__li383271334313">EEE, dd MMM yyyy HH:mm:ss z</li><li id="obs_04_0082__li15832141314319">EEEE, dd-MMM-yy HH:mm:ss z</li><li id="obs_04_0082__li19832101318434">EEE MMM dd HH:mm:ss yyyy</li></ol>
|
|
<p id="obs_04_0082__p883281314316">Examples:</p>
|
|
<ol id="obs_04_0082__ol1832713114315"><li id="obs_04_0082__li583218135434">x-obs-copy-source-if-unmodified-since: Sun, 06 Nov 1994 08:49:37 GMT</li><li id="obs_04_0082__li983221374317">x-obs-copy-source-if-unmodified-since: Sunday, 06-Nov-94 08:49:37 GMT</li><li id="obs_04_0082__li188321913144312">x-obs-copy-source-if-unmodified-since: Sun Nov 6 08:49:37 1994</li></ol>
|
|
<p id="obs_04_0082__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="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p7535566">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row711237"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p57610212">x-obs-storage-class</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p35915584">When copying an object, you can use this header to specify the storage class for the object. If you do not use this header, the object storage class is the default storage class of the destination bucket where the object is copied to.</p>
|
|
<p id="obs_04_0082__p54804800">Type: string</p>
|
|
<p id="obs_04_0082__p14339210104117">Storage class value options: <strong id="obs_04_0082__b135062351517">STANDARD</strong> (Standard), <strong id="obs_04_0082__b050619355517">WARM</strong> (Warm), <strong id="obs_04_0082__b1850663535115">COLD</strong> (Cold). These values are case sensitive.</p>
|
|
<p id="obs_04_0082__p10003777">Example: <strong id="obs_04_0082__b5907134014496">x-obs-storage-class: STANDARD</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p4999603">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row44996429"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p20832171">x-obs-website-redirect-location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p9684301">If a bucket is configured with the static website hosting function, it will redirect requests for this object to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.</p>
|
|
<p id="obs_04_0082__p20049852">Type: string</p>
|
|
<p id="obs_04_0082__p46230940">Default value: none</p>
|
|
<p id="obs_04_0082__p13425279">Constraint: The value must be prefixed by a slash (/), <strong id="obs_04_0082__b166008513413">http://</strong>, or <strong id="obs_04_0082__b560118593417">https://</strong>. The length of the value cannot exceed 2 KB.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p13705852">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row56243807"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p59454499">x-obs-server-side-encryption</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p51085108">Indicates that SSE-KMS is used. Objects are encrypted using SSE-KMS. </p>
|
|
<p id="obs_04_0082__p57112788">Type: string</p>
|
|
<p id="obs_04_0082__p44253049">Example: <strong id="obs_04_0082__b1786714506491">x-obs-server-side-encryption: kms</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p27727194">No. This header is required when SSE-KMS is used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row48218161"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p13357001">x-obs-server-side-encryption-kms-key-id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p8175281">Indicates the master key ID of an encrypted object. This header is used in SSE-KMS mode. If the customer does not provide the master key ID, the default master key ID will be used. If there is no such a default master key, OBS will create one and use it by default.</p>
|
|
<p id="obs_04_0082__p6468666">Type: string</p>
|
|
<p id="obs_04_0082__p6679135313114">The following two formats are supported:</p>
|
|
<p id="obs_04_0082__p48363114420">- <em id="obs_04_0082__i19676135810115">regionID</em><strong id="obs_04_0082__b767615584115">:</strong><em id="obs_04_0082__i8677558419">domainID</em><strong id="obs_04_0082__b267715815118">:key/</strong><em id="obs_04_0082__i767765815117">key_id</em></p>
|
|
<p id="obs_04_0082__p090816596123">2. <em id="obs_04_0082__i147211819211">key_id</em></p>
|
|
<p id="obs_04_0082__p558627121315"><em id="obs_04_0082__i14621949217">regionID</em> indicates the ID of the region where the key belongs. <em id="obs_04_0082__i362144328">domainID</em> indicates the ID of the tenant where the key belongs. <em id="obs_04_0082__i206221942218">key_id</em> indicates the ID of the key created in KMS.</p>
|
|
<p id="obs_04_0082__p17830152818144">Example:</p>
|
|
<p id="obs_04_0082__p112561459184814">- <strong id="obs_04_0082__b151496286416">x-obs-server-side-encryption-kms-key-id: </strong><em id="obs_04_0082__i9158196173911">region</em><strong id="obs_04_0082__b107421331244">:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</strong></p>
|
|
<p id="obs_04_0082__p1525814594487">- <strong id="obs_04_0082__b13601717885242">x-obs-server-side-encryption-kms-key-id: 4f1cd4de-ab64-4807-920a-47fc42e7f0d0</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p18037650">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row28121126"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p63218747">x-obs-server-side-encryption-customer-algorithm</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p20444868">Encryption algorithm. The header is used in SSE-C mode.</p>
|
|
<p id="obs_04_0082__p49786088">Type: string</p>
|
|
<p id="obs_04_0082__p45421610">Example: <strong id="obs_04_0082__b6891105794915">x-obs-server-side-encryption-customer-algorithm: AES256</strong></p>
|
|
<p id="obs_04_0082__p6141307">Constraint: This header must be used together with <strong id="obs_04_0082__b42885233353">x-obs-server-side-encryption-customer-key</strong> and <strong id="obs_04_0082__b228922310353">x-obs-server-side-encryption-customer-key-MD5</strong>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p27683830">No. This header is required when SSE-C is used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row47827882"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p48853270">x-obs-server-side-encryption-customer-key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p64800765">Indicates the key used to encrypt an object. The header is used in SSE-C mode. </p>
|
|
<p id="obs_04_0082__p46335979">Type: string</p>
|
|
<p id="obs_04_0082__p14370633">Example: <strong id="obs_04_0082__b724423175017">x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=</strong></p>
|
|
<p id="obs_04_0082__p62226841">Constraint: This header is a Base64-encoded 256-bit key and must be used together with <strong id="obs_04_0082__b10318175911353">x-obs-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0082__b531915903516">x-obs-server-side-encryption-customer-key-MD5</strong>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p7209335">No. This header is required when SSE-C is used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row64884015"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p21113881">x-obs-server-side-encryption-customer-key-MD5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p32502791">Indicates the MD5 value of a key used to encrypt a destination 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_0082__p24089667">Type: string</p>
|
|
<p id="obs_04_0082__p15480418">Example: <strong id="obs_04_0082__b19771137135015">x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
|
|
<p id="obs_04_0082__p5106035">Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with <strong id="obs_04_0082__b78892231591">x-obs-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0082__b289652385915">x-obs-server-side-encryption-customer-key</strong>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p10935708">No. This header is required when SSE-C is used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row31312509"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p53285261">x-obs-copy-source-server-side-encryption-customer-algorithm</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p21138857">Indicates the algorithm used to decrypt a source object. The header is used in SSE-C mode. </p>
|
|
<p id="obs_04_0082__p56031992">Type: string</p>
|
|
<p id="obs_04_0082__p34525882">Example: x-obs-copy-source-server-side-encryption-customer-algorithm: AES256</p>
|
|
<p id="obs_04_0082__p42297490">Constraint: This header must be used together with <strong id="obs_04_0082__b281608217172524">x-obs-copy-source-server-side-encryption-customer-key</strong> and <strong id="obs_04_0082__b2141855099172524">x-obs-copy-source-server-side-encryption-customer-key-MD5</strong>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p3544685">No. This header is required when SSE-C is used to copy a source object.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row31902170"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p33939001">x-obs-copy-source-server-side-encryption-customer-key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p64704556">Indicates the key used to decrypt a source object. The header is used in SSE-C mode. SSE-C mode.</p>
|
|
<p id="obs_04_0082__p45470097">Type: string</p>
|
|
<p id="obs_04_0082__p6577692">Example: <strong id="obs_04_0082__b34157585717">x-obs-copy-source-server-side-encryption-customer-key: K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=</strong></p>
|
|
<p id="obs_04_0082__p59199230">Constraint: This header is a Base64-encoded 256-bit key and must be used together with <strong id="obs_04_0082__b35523450">x-obs-copy-source-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0082__b51275595">x-obs-copy-source-server-side-encryption-customer-key-MD5</strong>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p30408307">No. This header is required when SSE-C is used to copy a source object.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row5239313"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p21731174">x-obs-copy-source-server-side-encryption-customer-key-MD5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p15394647">Indicates the MD5 value of the key used to decrypt a 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_0082__p4334102">Type: string</p>
|
|
<p id="obs_04_0082__p39006926">Example: <strong id="obs_04_0082__b1712381175720">x-obs-copy-source-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
|
|
<p id="obs_04_0082__p15518014">Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with <strong id="obs_04_0082__b13163154825910">x-obs-copy-source-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0082__b31701348145914">x-obs-copy-source-server-side-encryption-customer-key</strong>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p48999606">No. This header is required when SSE-C is used to copy a source object.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row1736618368212"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p3668922">success_action_redirect</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p28747278">Indicates the address (URL) to which a successfully responded request is redirected.</p>
|
|
<ul id="obs_04_0082__ul57398910"><li id="obs_04_0082__li46828145">If the value is valid and the request is successful, OBS returns status code 303. <strong id="obs_04_0082__b10498135144020">Location</strong> contains <strong id="obs_04_0082__b2499193511401">success_action_redirect</strong> as well as the bucket name, object name, and object ETag.</li><li id="obs_04_0082__li18800129">If this parameter value is invalid, OBS ignores this parameter. In such case, the <strong id="obs_04_0082__b954018371494">Location</strong> header is the object address, and OBS returns the response code based on whether the operation succeeds or fails.</li></ul>
|
|
<p id="obs_04_0082__p34983438">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p59109014">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row94188431078"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p5180191819182"><span style="color:#494949;">x-obs-object-lock-mode</span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p6180918151813">WORM mode that will be applied to the object. Currently, only <strong id="obs_04_0082__b208911432010">COMPLIANCE</strong> is supported. This header must be used together with <strong id="obs_04_0082__b289184132017">x-obs-object-lock-retain-until-date</strong>.</p>
|
|
<p id="obs_04_0082__p14496145181918">Type: string</p>
|
|
<p id="obs_04_0082__p154228537191">Example: <strong id="obs_04_0082__b7158928195714">x-obs-object-lock-mode:COMPLIANCE</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p2180181810184">No, but required when <strong id="obs_04_0082__b74771453587">x-obs-object-lock-retain-until-date</strong> is present.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row139914451072"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0082__p14809920131812"><span style="color:#494949;">x-obs-object-lock-retain-until-date</span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0082__p97201718162111">Indicates the expiration time of the Object Lock retention. The value must be a UTC time that complies with ISO 8601, for example, <strong id="obs_04_0082__b936316275255">2015-07-01T04:11:15Z</strong>. This header must be used together with <strong id="obs_04_0082__b20363112713257">x-obs-object-lock-mode</strong>.</p>
|
|
<p id="obs_04_0082__p1972081822113">Type: string</p>
|
|
<p id="obs_04_0082__p372031872119">Example: <strong id="obs_04_0082__b711955525713">x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0082__p080992031813">No, but required when <strong id="obs_04_0082__b1845739105516">x-obs-object-lock-mode</strong> is present.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p class="msonormal" id="obs_04_0082__p38343271">For details about other headers, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section37945824"><h4 class="sectiontitle">Request Elements</h4><p class="msonormal" id="obs_04_0082__p34957751">This request contains no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section5968100"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0082__screen39796368"><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>status_code
|
|
Content-Type:<span class="w"> </span>application/xml<span class="w"> </span>
|
|
Date:<span class="w"> </span>date
|
|
Content-Length:<span class="w"> </span>length
|
|
|
|
<span class="cp"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span><span class="w"> </span>
|
|
<span class="nt"><CopyObjectResult</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="w"> </span><span class="nt"><LastModified></span>modifiedDate<span class="nt"></LastModified></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>etagValue<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="nt"></CopyObjectResult></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section53712907"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0082__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>
|
|
<p class="msonormal" id="obs_04_0082__p50494524">In addition to the common response headers, the following message headers may also be used. For details, see <a href="#obs_04_0082__table45458228101549">Table 2</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0082__table45458228101549"></a><a name="table45458228101549"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0082__table45458228101549" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Additional response headers</caption><thead align="left"><tr id="obs_04_0082__row55626814"><th align="left" class="cellrowborder" valign="top" width="40.400000000000006%" id="mcps1.3.10.4.2.3.1.1"><p id="obs_04_0082__p9478074">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="59.599999999999994%" id="mcps1.3.10.4.2.3.1.2"><p id="obs_04_0082__p29526490">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0082__row42835462"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0082__p47120423">x-obs-copy-source-version-id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0082__p58657957">Version ID of the source object</p>
|
|
<p id="obs_04_0082__p58159570">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row53674087"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0082__p52633814">x-obs-version-id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0082__p35480537">Version ID of the target object</p>
|
|
<p id="obs_04_0082__p50889382">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row55351257"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0082__p54266813">x-obs-server-side-encryption</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0082__p33535726">This header is included in a response if SSE-KMS is used. </p>
|
|
<p id="obs_04_0082__p33386078">Type: string</p>
|
|
<p id="obs_04_0082__p32039251">Example: <strong id="obs_04_0082__b114211959185714">x-obs-server-side-encryption: kms</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row19917804"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0082__p2729467">x-obs-server-side-encryption-kms-key-id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0082__p19760307">Indicates the master key ID. This header is included in a response if SSE-KMS is used. </p>
|
|
<p id="obs_04_0082__p15246175313411">Type: string</p>
|
|
<p id="obs_04_0082__p15939253104414">Format: <em id="obs_04_0082__i1988314181665">regionID</em><strong id="obs_04_0082__b2088351812614">:</strong><em id="obs_04_0082__i19884418162">domainID</em><strong id="obs_04_0082__b1488481817616">:key/</strong><em id="obs_04_0082__i168842181619">key_id</em></p>
|
|
<p id="obs_04_0082__p13246753203417"><em id="obs_04_0082__i28551536020">regionID</em> indicates the ID of the region where the key belongs. <em id="obs_04_0082__i585663611216">domainID</em> indicates the ID of the tenant where the key belongs. <em id="obs_04_0082__i88561136327">key_id</em> indicates the key ID used in this encryption.</p>
|
|
<p id="obs_04_0082__p480014504493">Example: x-obs-server-side-encryption-kms-key-id: <em id="obs_04_0082__i046327392">region</em>:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row57081019"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0082__p60159803">x-obs-server-side-encryption-customer-algorithm</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0082__p41105884">Indicates an encryption algorithm. This header is included in a response if SSE-C is used.</p>
|
|
<p id="obs_04_0082__p34408640">Type: string</p>
|
|
<p id="obs_04_0082__p41242309">Example: <strong id="obs_04_0082__b1732821115818">x-obs-server-side-encryption-customer-algorithm: AES256</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row35636469"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0082__p872862">x-obs-server-side-encryption-customer-key-MD5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0082__p3592996">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_0082__p32336965">Type: string</p>
|
|
<p id="obs_04_0082__p22597230">Example: <strong id="obs_04_0082__b196497156589">x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row2048480"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0082__p31709196">x-obs-storage-class</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0082__p18308080">This header is returned when the storage class of an object is not Standard. The value can be <strong id="obs_04_0082__b16862175124619">WARM</strong> or <strong id="obs_04_0082__b1386325144617">COLD</strong>.</p>
|
|
<p id="obs_04_0082__p30554999">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section13654116"><h4 class="sectiontitle">Response Elements</h4><p class="msonormal" id="obs_04_0082__p59035875">This response contains elements of a copy result. <a href="#obs_04_0082__table5815269">Table 3</a> describes the elements.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0082__table5815269"></a><a name="table5815269"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0082__table5815269" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response elements</caption><thead align="left"><tr id="obs_04_0082__row2898465"><th align="left" class="cellrowborder" valign="top" width="34.339999999999996%" id="mcps1.3.11.3.2.3.1.1"><p id="obs_04_0082__p33449116">Element</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.66%" id="mcps1.3.11.3.2.3.1.2"><p id="obs_04_0082__p23888070">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0082__row33207335"><td class="cellrowborder" valign="top" width="34.339999999999996%" headers="mcps1.3.11.3.2.3.1.1 "><p id="obs_04_0082__p5439587">CopyObjectResult</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.66%" headers="mcps1.3.11.3.2.3.1.2 "><p id="obs_04_0082__p37953428">Container for the copy result</p>
|
|
<p id="obs_04_0082__p6036540">Type: XML</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row54328866"><td class="cellrowborder" valign="top" width="34.339999999999996%" headers="mcps1.3.11.3.2.3.1.1 "><p id="obs_04_0082__p38562036">LastModified</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.66%" headers="mcps1.3.11.3.2.3.1.2 "><p id="obs_04_0082__p36517235">Latest time when the object was modified</p>
|
|
<p id="obs_04_0082__p60219662">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0082__row5106054"><td class="cellrowborder" valign="top" width="34.339999999999996%" headers="mcps1.3.11.3.2.3.1.1 "><p id="obs_04_0082__p10937238">ETag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.66%" headers="mcps1.3.11.3.2.3.1.2 "><p id="obs_04_0082__p13501066">128-bit MD5 digest of the Base64 code of a new object. ETag is the unique identifier of the object content. It can be used to identify whether the object content is changed. For example, if ETag value is <strong id="obs_04_0082__b1729195513584">A</strong> when an object is uploaded and the ETag value has changed to <strong id="obs_04_0082__b773055585819">B</strong> when the object is downloaded, it indicates that the object content is changed.</p>
|
|
<p id="obs_04_0082__p54400733">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section55778186"><h4 class="sectiontitle">Error Responses</h4><p class="msonormal" id="obs_04_0082__p44383267">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_0082__section14482163815396"><h4 class="sectiontitle">Sample Request: Copying an Object</h4><p id="obs_04_0082__p16927133602512">Copy the object <strong id="obs_04_0082__b16732163364411">srcobject</strong> in bucket <strong id="obs_04_0082__b1895185144413">bucket</strong> to the <strong id="obs_04_0082__b18111165554415">destobject</strong> object in bucket <strong id="obs_04_0082__b14247820457">examplebucket</strong>.</p>
|
|
<div class="codecoloring" codetype="Xml" id="obs_04_0082__screen8484163863919"><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>PUT<span class="w"> </span>/destobject<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>04:19:21<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:2rZR+iaH8xUewvUKuicLhLHpNoU=
|
|
x-obs-copy-source:<span class="w"> </span>/bucket/srcobject
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section16705110192513"><h4 class="sectiontitle">Sample Response: Copying an Object</h4><div class="codecoloring" codetype="Xml" id="obs_04_0082__screen1217910182511"><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></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>001B21A61C6C00000134031BE8005293
|
|
x-obs-id-2:<span class="w"> </span>MDAxQjIxQTYxQzZDMDAwMDAxMzQwMzFCRTgwMDUyOTNBQUFBQUFBQWJiYmJiYmJi
|
|
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>249
|
|
|
|
<span class="cp"><?xml version="1.0" encoding="utf-8"?></span>
|
|
<span class="nt"><CopyObjectResult</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="w"> </span><span class="nt"><LastModified></span>2015-07-01T00:48:07.706Z<span class="nt"></LastModified></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>"507e3fff69b69bf57d303e807448560b"<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="nt"></CopyObjectResult></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section8758150152520"><h4 class="sectiontitle">Sample Request: Copying an Object Version</h4><p id="obs_04_0082__p18398511122614">Copy a multi-version object and copy the object <strong id="obs_04_0082__b11699433114514">srcobject</strong> whose version number is <strong id="obs_04_0082__b14166151204517">AAABQ4uBLdLc0vycq3gAAAAEVURTRkha</strong> in bucket <strong id="obs_04_0082__b17236115612454">bucket</strong> to the <strong id="obs_04_0082__b655770134611">destobject</strong> object in bucket <strong id="obs_04_0082__b131832420467">examplebucket</strong>.</p>
|
|
<div class="codecoloring" codetype="Xml" id="obs_04_0082__screen18745619263"><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>PUT<span class="w"> </span>/destobject<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>04:20:29<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:4BLYv+1UxfRSHBMvrhVLDszxvcY=
|
|
x-obs-copy-source:<span class="w"> </span>/bucket/srcobject?versionId=AAABQ4uBLdLc0vycq3gAAAAEVURTRkha
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0082__section13963521142616"><h4 class="sectiontitle">Sample Response: Copying an Object Version</h4><div class="codecoloring" codetype="Xml" id="obs_04_0082__screen168691651144711"><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>
|
|
<span class="normal">14</span>
|
|
<span class="normal">15</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>DCD2FC9CAB78000001438B8A9C898B79
|
|
x-obs-id-2:<span class="w"> </span>DB/qBZmbN6AIoX9mrrSNYdLxwvbO0tLR/l6/XKTT4NmZspzharwp5Z74ybAYVOgr
|
|
Content-Type:<span class="w"> </span>application/xml
|
|
x-obs-version-id:<span class="w"> </span>AAABQ4uKnOrc0vycq3gAAAAFVURTRkha
|
|
x-obs-copy-source-version-id:<span class="w"> </span>AAABQ4uBLdLc0vycq3gAAAAEVURTRkha
|
|
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:20:29<span class="w"> </span>GMT
|
|
Transfer-Encoding:<span class="w"> </span>chunked
|
|
|
|
<span class="cp"><?xml version="1.0" encoding="utf-8"?></span>
|
|
<span class="nt"><CopyObjectResult</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="w"> </span><span class="nt"><LastModified></span>2015-07-01T01:48:07.706Z<span class="nt"></LastModified></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>"507e3fff69b69bf57d303e807448560b"<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="nt"></CopyObjectResult></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_0079.html">Operations on Objects</a></div>
|
|
</div>
|
|
</div>
|
|
|