doc-exports/docs/obs/s3api/en-us_topic_0125560348.html
zhangyue 6fcdbfd13e OBS S3 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>
2024-02-26 11:17:13 +00:00

427 lines
45 KiB
HTML

<a name="EN-US_TOPIC_0125560348"></a><a name="EN-US_TOPIC_0125560348"></a>
<h1 class="topictitle1">PUT Object - Copy</h1>
<div id="body46719429"><p id="EN-US_TOPIC_0125560348__p49299325">You can use this operation to create a copy of an existing object in OBS.</p>
<p id="EN-US_TOPIC_0125560348__p41040744">By default, a <strong id="EN-US_TOPIC_0125560348__b26177411">PUT Object - Copy</strong> operation copies object metadata together with the object. If you want to update the metadata, provide new metadata in the <strong id="EN-US_TOPIC_0125560348__b34270115">PUT Object - Copy</strong> request. The object ACL is not copied together with the object and the ACL of a copy object is set to <strong id="EN-US_TOPIC_0125560348__b39995586">private</strong> by default. You can send a <strong id="EN-US_TOPIC_0125560348__b24415962">PUT Object acl</strong> request to modify the object ACL.</p>
<p id="EN-US_TOPIC_0125560348__p33822378">The <strong id="EN-US_TOPIC_0125560348__b31535868">PUT Object - Copy</strong> request must contain authentication information and cannot contain a request body.</p>
<p id="EN-US_TOPIC_0125560348__p1163583619736">This operation makes server-side encryption available, but cannot change encrypted objects to non-encrypted ones. If a user performs this operation to change the encrypted objects, the system returns error code <strong id="EN-US_TOPIC_0125560348__b54083960191126">400</strong>.</p>
<p id="EN-US_TOPIC_0125560348__p43643070173831">When objects are copied, the storage classes of target objects are consistent with the default storage classes of target buckets.</p>
<div class="section" id="EN-US_TOPIC_0125560348__section35965948"><h4 class="sectiontitle">Versioning</h4><p id="EN-US_TOPIC_0125560348__p4268531">By default, <strong id="EN-US_TOPIC_0125560348__b1298611391314">x-amz-copy-source</strong> specifies the latest version of the source object. If the latest version of the source object is a deletion mark, the object is considered to be deleted. You can add <strong id="EN-US_TOPIC_0125560348__b10206759">versionId</strong> to request header <strong id="EN-US_TOPIC_0125560348__b24751971">x-amz-copy-source</strong> to copy an object with the specified version ID.</p>
<p id="EN-US_TOPIC_0125560348__p21441151">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="EN-US_TOPIC_0125560348__b169431522171320">x-amz-version-id</strong>. If a bucket has versioning suspended, the version ID of the requested object in this bucket is <strong id="EN-US_TOPIC_0125560348__b59011684">null</strong>.</p>
<div class="notice" id="EN-US_TOPIC_0125560348__note3615194619509"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="EN-US_TOPIC_0125560348__p76051530518">If multi-version is not enabled for a bucket, you can replace source object <strong id="EN-US_TOPIC_0125560348__b137847285133">objecta</strong> with target object <strong id="EN-US_TOPIC_0125560348__b169381333101313">objectb</strong> by replication. If <strong id="EN-US_TOPIC_0125560348__b58124231311">objectb</strong> already exists before you perform replication, the new <strong id="EN-US_TOPIC_0125560348__b1664204711135">objectb</strong> will overwrite the old <strong id="EN-US_TOPIC_0125560348__b738655317134">objectb</strong> after you perform replication.</p>
<p id="EN-US_TOPIC_0125560348__p146051435511">After replication is performed successfully, only new <strong id="EN-US_TOPIC_0125560348__b18848205971319">objectb</strong> can be downloaded. The old <strong id="EN-US_TOPIC_0125560348__b108497651411">objectb</strong> will be deleted. Before using the copy interface, ensure that the target object does not exist or is useless to avoid incorrect data deletion. During the replication, the source object <strong id="EN-US_TOPIC_0125560348__b2070461212141">objecta</strong> is not changed.</p>
<p id="EN-US_TOPIC_0125560348__p1760510355113">You cannot determine whether a request is executed successfully only using <strong id="EN-US_TOPIC_0125560348__b99541218201411">status_code</strong> in the header returned by HTTP. If 200 in <strong id="EN-US_TOPIC_0125560348__b7514627181413">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 replication operation succeeds. The replication operation succeeds only when the body has ETags. Otherwise, the replication operation fails.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section1475721115541"><h4 class="sectiontitle">WORM</h4><p id="EN-US_TOPIC_0125560348__p134973436414">If a bucket has WORM enabled, you can configure retention policies for objects in the bucket. You can specify the <strong id="EN-US_TOPIC_0125560348__b16286138101016">x-amz-object-lock-mode</strong> and <strong id="EN-US_TOPIC_0125560348__b142863861017">x-amz-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, see section <a href="en-us_topic_0000001806154009.html">Configuring WORM Retention for an Object</a>.</p>
<div class="note" id="EN-US_TOPIC_0125560348__note7241205112419"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0125560348__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="EN-US_TOPIC_0125560348__section3886489515555"><h4 class="sectiontitle">OBS Cold Objects</h4><p id="EN-US_TOPIC_0125560348__p50475010151228">If source objects are OBS cold objects, check the restore status of the objects. You can copy the OBS cold objects only after the objects are restored. If the objects are not restored or are being restored, the copy fails, and error "403 Forbidden" is returned. The fault is described as follows:</p>
<p id="EN-US_TOPIC_0125560348__p51621907151228">ErrorCode: InvalidObjectState</p>
<p id="EN-US_TOPIC_0125560348__p61943982151228">ErrorMessage: Operation is not valid for the source object's storage class</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section4469833"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560348__screen49805730112558"> PUT /destinationObjectName HTTP/1.1
User-Agent: agent
Host: bucketname.obs.example.com
Accept: */*
x-amz-copy-source: /sourceBucket/sourceObject
x-amz-metadata-directive: COPY
x-amz-copy-source-if-match: etag
x-amz-copy-source-if-none-match: etag
x-amz-copy-source-if-unmodified-since: time_stamp
x-amz-copy-source-if-modified-since: time_stamp
Authorization: signatureValue
Date: date</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section40228503"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0125560348__p45737299">This request involves no parameters.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section26512207"><h4 class="sectiontitle">Request Headers</h4><p id="EN-US_TOPIC_0125560348__p13733718">This request uses common headers. For details about common request headers, see section <a href="en-us_topic_0125560462.html">Common Request Headers</a>. In addition, you can add optional headers to specify the object to be copied. <a href="#EN-US_TOPIC_0125560348__table59683248">Table 1</a> describes the optional headers.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560348__table59683248"></a><a name="table59683248"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560348__table59683248" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Optional request headers</caption><thead align="left"><tr id="EN-US_TOPIC_0125560348__row66482620"><th align="left" class="cellrowborder" valign="top" width="26.842684268426847%" id="mcps1.3.11.3.2.4.1.1"><p id="EN-US_TOPIC_0125560348__p16383173">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.155015501550146%" id="mcps1.3.11.3.2.4.1.2"><p id="EN-US_TOPIC_0125560348__p51968642">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.002300230023003%" id="mcps1.3.11.3.2.4.1.3"><p id="EN-US_TOPIC_0125560348__p48710492">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560348__row53235770"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p17130117">x-amz-acl</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p20507816152311">Indicates the ACL applied to the copy object. Possible values are <strong id="EN-US_TOPIC_0125560348__b19507121613233">private</strong>, <strong id="EN-US_TOPIC_0125560348__b1650711619237">public-read</strong>, <strong id="EN-US_TOPIC_0125560348__b12507316152316">public-read-write</strong>, <strong id="EN-US_TOPIC_0125560348__b25071416172318">authenticated-read</strong>, <strong id="EN-US_TOPIC_0125560348__b1650791622317">bucket-owner-read</strong>, and <strong id="EN-US_TOPIC_0125560348__b135071162233">bucket-owner-full-control</strong>.</p>
<p id="EN-US_TOPIC_0125560348__p45362212">Type: String</p>
<p id="EN-US_TOPIC_0125560348__p10940237105513">Example:</p>
<p id="EN-US_TOPIC_0125560348__p26779645">x-amz-acl: acl</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p60791181">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row10249724"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p24921279">x-amz-copy-source</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p5357756">Indicates the name of the source bucket and the key of the source object. If the source object has multiple version IDs, <strong id="EN-US_TOPIC_0125560348__b48219807">versionId</strong> is used to specify the required version ID.</p>
<p id="EN-US_TOPIC_0125560348__p31325081">Type: String</p>
<p id="EN-US_TOPIC_0125560348__p177681539125616">Example: x-amz-copy-source: /source_bucket/sourceObject</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p36516628">Mandatory</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row60214201"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p45512090">x-amz-metadata-directive</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p62600705">Indicates whether the metadata is copied from the source object or replaced with the metadata provided in the request.</p>
<p id="EN-US_TOPIC_0125560348__p26535433">Type: String</p>
<p id="EN-US_TOPIC_0125560348__p37492307">Valid values: <strong id="EN-US_TOPIC_0125560348__b1886449">COPY</strong> or <strong id="EN-US_TOPIC_0125560348__b16978042">REPLACE</strong></p>
<p id="EN-US_TOPIC_0125560348__p18584657">Default: <strong id="EN-US_TOPIC_0125560348__b33044190">COPY</strong></p>
<p id="EN-US_TOPIC_0125560348__p166073287567">Example: x-amz-metadata-directive: <strong id="EN-US_TOPIC_0125560348__b22531436163515">COPY</strong></p>
<p id="EN-US_TOPIC_0125560348__p64241563">Constraints:</p>
<ul id="EN-US_TOPIC_0125560348__ul41303163"><li id="EN-US_TOPIC_0125560348__li36184149">If the value is neither <strong id="EN-US_TOPIC_0125560348__b57221892">COPY</strong> nor <strong id="EN-US_TOPIC_0125560348__b45234984">REPLACE</strong>, OBS returns status code <strong id="EN-US_TOPIC_0125560348__b2215046577">400</strong>.</li><li id="EN-US_TOPIC_0125560348__li4461674">If you want to copy an object to itself, set the value to <strong id="EN-US_TOPIC_0125560348__b40155067">REPLACE</strong>. Otherwise, OBS considers the request invalid and returns status code <strong id="EN-US_TOPIC_0125560348__b2178201265715">400</strong>.</li></ul>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p31334966">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row13579242"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p26176854">x-amz-copy-source-if-match</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p39950397">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="EN-US_TOPIC_0125560348__p24009259">Type: String</p>
<p id="EN-US_TOPIC_0125560348__p1325511618579">Example: x-amz-copy-source-if-match: etag</p>
<p id="EN-US_TOPIC_0125560348__p54445730">Constraints: This header can be used with <strong id="EN-US_TOPIC_0125560348__b20249527">x-amz-copy-source-if-unmodified-since</strong> but cannot be used with other conditional copy headers.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p29598957">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row65064025"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p35694663">x-amz-copy-source-if-none-match</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p5586594">Copies the source object only if its ETag is different from the one specified by this header, otherwise a 412 HTTP status code error (failed precondition) is returned.</p>
<p id="EN-US_TOPIC_0125560348__p50279347">Type: String</p>
<p id="EN-US_TOPIC_0125560348__p422542920571">Example: x-amz-copy-source-if-none-match: etag</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p42733733">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row49059277"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p14378473">x-amz-copy-source-if-unmodified-since</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p23805690">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.</p>
<p id="EN-US_TOPIC_0125560348__p12924626">Type: HTTP time string complying with the format specified in http://www.ietf.org/rfc/rfc2616.txt.</p>
<p id="EN-US_TOPIC_0125560348__p8196113755710">Example: x-amz-copy-source-if-unmodified-since: time-stamp</p>
<p id="EN-US_TOPIC_0125560348__p26811930">Constraints: This header can be used with <strong id="EN-US_TOPIC_0125560348__b39980785">x-amz-copy-source-if-match</strong> but cannot be used with other conditional copy headers.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p17218116">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row20745324"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p2649692">x-amz-copy-source-if-modified-since</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p13298480">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.</p>
<p id="EN-US_TOPIC_0125560348__p52577459">Type: HTTP time string complying with the format specified in http://www.ietf.org/rfc/rfc2616.txt.</p>
<p id="EN-US_TOPIC_0125560348__p20227659195720">Example: x-amz-copy-source-if-modified-since: time-stamp</p>
<p id="EN-US_TOPIC_0125560348__p9806758">Constraints: This header can be used with <strong id="EN-US_TOPIC_0125560348__b21151959">x-amz-copy-source-if-none-match</strong> but cannot be used with other conditional copy headers.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p35587158">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row3055850814546"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p1666552019542">x-amz-storage-class</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p7305518157">When creating an object, you can add this header in the request to set the storage class of the object. If you do not add this header, the object will use the default storage class of the bucket.</p>
<p id="EN-US_TOPIC_0125560348__p183055181656">Type: String</p>
<p id="EN-US_TOPIC_0125560348__p83054181511">Note: The storage class can be <strong id="EN-US_TOPIC_0125560348__b4305121814519">STANDARD</strong> (OBS Standard), <strong id="EN-US_TOPIC_0125560348__b1830516181052">STANDARD_IA</strong> (OBS Warm), or <strong id="EN-US_TOPIC_0125560348__b43051018859">GLACIER</strong> (OBS Cold). Note that the three storage class values are case-sensitive.</p>
<p id="EN-US_TOPIC_0125560348__p63051018859">Example: x-amz-storage-class: STANDARD</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p1157872174110">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row51848974"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p39017328">x-amz-website-redirect-location</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p6287015">If a bucket is configured as a website, redirects 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="EN-US_TOPIC_0125560348__p56583142">Type: String</p>
<p id="EN-US_TOPIC_0125560348__p39486235">Default: None</p>
<p id="EN-US_TOPIC_0125560348__p19831799">Constraint: The value must be prefixed by a slash (/), <strong id="EN-US_TOPIC_0125560348__b44268467">http://</strong>, or <strong id="EN-US_TOPIC_0125560348__b87443517142">https://</strong>. The length of the value cannot exceed 2 K.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p59458202">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row42184781102735"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p21220179123822">x-amz-server-side-encryption</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p41112973123822">Indicates the SSE-KMS mode. The destination object uses SSE-KMS for encryption.</p>
<p id="EN-US_TOPIC_0125560348__p34472444123822">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p41816544123822">Example: x-amz-server-side-encryption:aws:kms</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p31696883123822">No. This header is mandatory when SSE-KMS is used.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row32920370102833"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p21578594123822">x-amz-server-side-encryption-aws-kms-key-id</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p3035726123822">Indicates the master key ID. This header is used in SSE-KMS mode. If the customer does not provide the master key, the default master key will be used.</p>
<p id="EN-US_TOPIC_0125560348__p27321534123822">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p3578182595819">Example: x-amz-server-side-encryption-aws-kms-key-id:arn:aws:kms:sichuan:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p53175169123822">No</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row62153691102822"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p4432417512395">x-amz-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p3348839412395">Indicates an encryption algorithm. The header is used in SSE-C mode.</p>
<p id="EN-US_TOPIC_0125560348__p3296009412395">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p2820539812395">Example: x-amz-server-side-encryption-customer-algorithm:AES256</p>
<p id="EN-US_TOPIC_0125560348__p5252199412395">Constraints: This header must be used together with <strong id="EN-US_TOPIC_0125560348__b293589812395">x-amz-server-side-encryption-customer-key</strong> and <strong id="EN-US_TOPIC_0125560348__b2642308912395">x-amz-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p5989548512395">No. This parameter is mandatory when SSE-C is used.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row17017962102815"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p4304762712395">x-amz-server-side-encryption-customer-key</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p6430572912395">Indicates a key used to encrypt destination objects. The header is used in SSE-C mode.</p>
<p id="EN-US_TOPIC_0125560348__p4188065312395">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p4138156012395">Example: x-amz-server-side-encryption-customer-key:K7QkYpBkM5+hcs27fsNkUnNVaobncnLht/rCB2o/9Cw=</p>
<p id="EN-US_TOPIC_0125560348__p3688972312395">Constraints: This header is a base64-encoded 256-bit or 512-bit key and must be used together with <strong id="EN-US_TOPIC_0125560348__b6357205512395">x-amz-server-side-encryption-customer-algorithm</strong> and <strong id="EN-US_TOPIC_0125560348__b3527759012395">x-amz-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p3891251712395">No. This header is mandatory when SSE-C is used.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row65245422102749"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p4728453712395">x-amz-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p484225012395">Indicates the MD5 value of a key used to encrypt objects. 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="EN-US_TOPIC_0125560348__p4358025312395">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p5667796412395">Example: x-amz-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</p>
<p id="EN-US_TOPIC_0125560348__p4033963012395">Constraints: This header is a base64-encoded 128-bit MD5 value and must be used together with <strong id="EN-US_TOPIC_0125560348__b2751235812395">x-amz-server-side-encryption-customer-algorithm</strong> and <strong id="EN-US_TOPIC_0125560348__b4628463612395">x-amz-server-side-encryption-customer-key</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p5806804612395">No. This header is mandatory when SSE-C is used.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row45574092102745"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p12564056123925">x-amz-copy-source-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p11055621123925">Indicates the algorithm used to decrypt a source object. The header is used in SSE-C mode.</p>
<p id="EN-US_TOPIC_0125560348__p32391731123925">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p23090127123925">Example: x-amz-copy-source-server-side-encryption-customer-algorithm:AES256</p>
<p id="EN-US_TOPIC_0125560348__p6484554123925">Constraints: This header must be used together with <strong id="EN-US_TOPIC_0125560348__b183691442181411">x-amz-copy-source-server-side-encryption-customer-key</strong> and <strong id="EN-US_TOPIC_0125560348__b55486857123925">x-amz-copy-source-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p65250457123925">No. This header is mandatory when SSE-C is used to copy a source object.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row45537881102741"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p54507955123925">x-amz-copy-source-server-side-encryption-customer-key</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p53068195123925">Indicates the key used to decrypt a source object. The header is used in SSE-C mode.</p>
<p id="EN-US_TOPIC_0125560348__p7851708123925">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p3556511123925">Example: x-amz-copy-source-server-side-encryption-customer-key:K7QkYpBkM5+hcs27fsNkUnNVaobncnLht/rCB2o/9Cw=</p>
<p id="EN-US_TOPIC_0125560348__p32008606123925">Constraints: This header is a base64-encoded 256-bit or 512-bit key and must be used together with <strong id="EN-US_TOPIC_0125560348__b19642000123925">x-amz-copy-source-server-side-encryption-customer-algorithm</strong> and <strong id="EN-US_TOPIC_0125560348__b42560280123925">x-amz-copy-source-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p24830675123925">No. This header is mandatory when SSE-C is used to copy a source object.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row13212054102811"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p49278127123925">x-amz-copy-source-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p32105346123925">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="EN-US_TOPIC_0125560348__p20512663123925">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p50396242123925">Example: x-amz-copy-source-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</p>
<p id="EN-US_TOPIC_0125560348__p50912996123925">Constraints: This header is a base64-encoded 128-bit MD5 value and must be used together with <strong id="EN-US_TOPIC_0125560348__b55563782123925">x-amz-copy-source-server-side-encryption-customer-algorithm</strong> and <strong id="EN-US_TOPIC_0125560348__b30311993123925">x-amz-copy-source-server-side-encryption-customer-key</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p39352383123925">No. This header is mandatory when SSE-C is used to copy a source object.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row89721291390"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p588915106396">x-amz-security-token</p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p488919106393">Header field used to identify the request of a federated user. When the federal authentication function is enabled, users sending such requests are identified as federated users.</p>
<p id="EN-US_TOPIC_0125560348__p4889191015391">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p1988913104399">Optional. This parameter must be carried in the request sent by federated users.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row157164714615"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p5180191819182"><span style="color:#494949;">x-amz-object-lock-mode</span></p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__p6180918151813">WORM mode that will be applied to the object. Currently, only <strong id="EN-US_TOPIC_0125560348__b208911432010">COMPLIANCE</strong> is supported. This header must be used together with <strong id="EN-US_TOPIC_0125560348__b289184132017">x-amz-object-lock-retain-until-date</strong>.</p>
<p id="EN-US_TOPIC_0125560348__p14496145181918">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p154228537191">Example: <strong id="EN-US_TOPIC_0125560348__b7158928195714">x-amz-object-lock-mode:COMPLIANCE</strong></p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p2180181810184">No, but required when <strong id="EN-US_TOPIC_0125560348__b74771453587">x-amz-object-lock-retain-until-date</strong> is present.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row511310503616"><td class="cellrowborder" valign="top" width="26.842684268426847%" headers="mcps1.3.11.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560348__p14809920131812"><span style="color:#494949;">x-amz-object-lock-retain-until-date</span></p>
</td>
<td class="cellrowborder" valign="top" width="50.155015501550146%" headers="mcps1.3.11.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560348__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="EN-US_TOPIC_0125560348__b936316275255">2015-07-01T04:11:15Z</strong>. This header must be used together with <strong id="EN-US_TOPIC_0125560348__b20363112713257">x-amz-object-lock-mode</strong>.</p>
<p id="EN-US_TOPIC_0125560348__p1972081822113">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p372031872119">Example: <strong id="EN-US_TOPIC_0125560348__b711955525713">x-amz-object-lock-retain-until-date:2015-07-01T04:11:15Z</strong></p>
</td>
<td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.11.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560348__p080992031813">No, but required when <strong id="EN-US_TOPIC_0125560348__b1845739105516">x-amz-object-lock-mode</strong> is present.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0125560348__p51385085">For details about other headers, see section <a href="en-us_topic_0125560462.html">Common Request Headers</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section37283276"><h4 class="sectiontitle">Request Elements</h4><p id="EN-US_TOPIC_0125560348__p49720363">This request involves no elements.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section35297384"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560348__screen41012505112623">HTTP/1.1 status_code
Server: Server Name
x-amz-request-id: request id
x-amz-id-2: id
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: type
Date: date
Content-Length: length
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;CopyObjectResult xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;LastModified&gt;modifiedDate&lt;/LastModified&gt;
&lt;ETag&gt;etagValue&lt;/ETag&gt;
&lt;/CopyObjectResult&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section49241002"><h4 class="sectiontitle">Response Headers</h4><p id="EN-US_TOPIC_0125560348__p34309360">This response uses common headers. For details about common response headers, see section <a href="en-us_topic_0125560484.html">Common Response Headers</a>.</p>
<p id="EN-US_TOPIC_0125560348__p47026694">This response also uses optional headers, as described in <a href="#EN-US_TOPIC_0125560348__table44830087">Table 2</a>.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560348__table44830087"></a><a name="table44830087"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560348__table44830087" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Optional response header</caption><thead align="left"><tr id="EN-US_TOPIC_0125560348__row57259714"><th align="left" class="cellrowborder" valign="top" width="42.870000000000005%" id="mcps1.3.14.4.2.3.1.1"><p id="EN-US_TOPIC_0125560348__p7525275">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.13%" id="mcps1.3.14.4.2.3.1.2"><p id="EN-US_TOPIC_0125560348__p5567508">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560348__row48314965"><td class="cellrowborder" valign="top" width="42.870000000000005%" headers="mcps1.3.14.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560348__p21198087">x-amz-copy-source-version-id</p>
</td>
<td class="cellrowborder" valign="top" width="57.13%" headers="mcps1.3.14.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560348__p39323473">Indicates the version ID of the source object.</p>
<p id="EN-US_TOPIC_0125560348__p18366943">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row31084764"><td class="cellrowborder" valign="top" width="42.870000000000005%" headers="mcps1.3.14.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560348__p34837968">x-amz-version-id</p>
</td>
<td class="cellrowborder" valign="top" width="57.13%" headers="mcps1.3.14.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560348__p3303123">Indicates the version ID of the target object.</p>
<p id="EN-US_TOPIC_0125560348__p29728115">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row63702400102931"><td class="cellrowborder" valign="top" width="42.870000000000005%" headers="mcps1.3.14.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560348__p3616339517113">x-amz-server-side-encryption</p>
</td>
<td class="cellrowborder" valign="top" width="57.13%" headers="mcps1.3.14.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560348__p4355391217113">This header is included in a response if SSE-KMS is used.</p>
<p id="EN-US_TOPIC_0125560348__p5644089417113">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p3820600617113">Example: x-amz-server-side-encryption:aws:kms</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row3814548102942"><td class="cellrowborder" valign="top" width="42.870000000000005%" headers="mcps1.3.14.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560348__p199994017113">x-amz-server-side-encryption-aws-kms-key-id</p>
</td>
<td class="cellrowborder" valign="top" width="57.13%" headers="mcps1.3.14.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560348__p2777747017113">Indicates the master key ID. This header is included in a response if SSE-KMS is used.</p>
<p id="EN-US_TOPIC_0125560348__p4867064117113">Example: x-amz-server-side-encryption-aws-kms-key-id:arn:aws:kms:sichuan:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row57904797102938"><td class="cellrowborder" valign="top" width="42.870000000000005%" headers="mcps1.3.14.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560348__p4741738317113">x-amz-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="57.13%" headers="mcps1.3.14.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560348__p1560279017113">Indicates an encryption algorithm. This header is included in a response if SSE-C is used.</p>
<p id="EN-US_TOPIC_0125560348__p620738517113">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p5586646617113">Example: x-amz-server-side-encryption-customer-algorithm:AES256</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row43265229102935"><td class="cellrowborder" valign="top" width="42.870000000000005%" headers="mcps1.3.14.4.2.3.1.1 "><p id="EN-US_TOPIC_0125560348__p5868213117113">x-amz-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="57.13%" headers="mcps1.3.14.4.2.3.1.2 "><p id="EN-US_TOPIC_0125560348__p5563216517113">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="EN-US_TOPIC_0125560348__p3092743917113">Type: string</p>
<p id="EN-US_TOPIC_0125560348__p991150317113">Example: x-amz-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section40515840"><h4 class="sectiontitle">Response Elements</h4><p id="EN-US_TOPIC_0125560348__p62742061">This response contains elements to indicate the copy results. <a href="#EN-US_TOPIC_0125560348__table5815269">Table 3</a> describes the elements.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560348__table5815269"></a><a name="table5815269"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560348__table5815269" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response elements</caption><thead align="left"><tr id="EN-US_TOPIC_0125560348__row43001397"><th align="left" class="cellrowborder" valign="top" width="32.550000000000004%" id="mcps1.3.15.3.2.3.1.1"><p id="EN-US_TOPIC_0125560348__p60561095">Element</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67.45%" id="mcps1.3.15.3.2.3.1.2"><p id="EN-US_TOPIC_0125560348__p6501678">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560348__row56873938"><td class="cellrowborder" valign="top" width="32.550000000000004%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560348__p43386266">CopyObjectResult</p>
</td>
<td class="cellrowborder" valign="top" width="67.45%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560348__p24626671">Indicates the container for copy results.</p>
<p id="EN-US_TOPIC_0125560348__p20313449">Type: XML</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row48603320"><td class="cellrowborder" valign="top" width="32.550000000000004%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560348__p44554846">LastModified</p>
</td>
<td class="cellrowborder" valign="top" width="67.45%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560348__p52172744">Indicates the date when the object was last modified.</p>
<p id="EN-US_TOPIC_0125560348__p66901514">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560348__row65242718"><td class="cellrowborder" valign="top" width="32.550000000000004%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560348__p50168842">ETag</p>
</td>
<td class="cellrowborder" valign="top" width="67.45%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560348__p37144369">Indicates the ETag of the new object.</p>
<p id="EN-US_TOPIC_0125560348__p65863871">Type: String</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section29098241"><h4 class="sectiontitle">Error Responses</h4><p id="EN-US_TOPIC_0125560348__p31924758">No special error responses are returned. For details about error responses, see <a href="en-us_topic_0125560440.html#EN-US_TOPIC_0125560440__table30733758">Table 1</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section28473001"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560348__screen24636448112645">PUT /destobject HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Host: bucketname.obs.example.com
Accept: */*
Date: Sat, 03 Dec 2011 08:48:07 +0000
Authorization: AWS BF6C09F302931425E9A7:2rZR+iaH8xUewvUKuicLhLHpNoU=
x-amz-copy-source: /bucket/srcobject</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section54930419"><h4 class="sectiontitle">Sample Response</h4><pre class="screen" id="EN-US_TOPIC_0125560348__screen126081314395">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: 001B21A61C6C00000134031BE8005293
x-amz-id-2: MDAxQjIxQTYxQzZDMDAwMDAxMzQwMzFCRTgwMDUyOTNBQUFBQUFBQWJiYmJiYmJi
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: application/xml
Date: Sat, 03 Dec 2011 08:48:07 GMT
Content-Length: 254
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;CopyObjectResult xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;LastModified&gt;2011-12-03T08:48:07.706Z&lt;/LastModified&gt;
&lt;ETag&gt;"507e3fff69b69bf57d303e807448560b"&lt;/ETag&gt;
&lt;/CopyObjectResult&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section20178982"><h4 class="sectiontitle">Sample Request (Copying an Object with Version ID Specified to a Bucket with Versioning Enabled)</h4><pre class="screen" id="EN-US_TOPIC_0125560348__screen3992821511276">PUT /destobject HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Host: bucketname.obs.example.com
Accept: */*
Date: Mon, 13 Jan 2014 12:19:13 +0000
Authorization: AWS C5780CDE717D50F4CDAA:4BLYv+1UxfRSHBMvrhVLDszxvcY=
x-amz-copy-source: versionbucket/srcobject?versionId=AAABQ4uBLdLc0vycq3gAAAAEVURTRkha</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section47393112"><h4 class="sectiontitle">Sample Response (Copying an Object with Version ID Specified to a Bucket with Versioning Enabled)</h4><pre class="screen" id="EN-US_TOPIC_0125560348__screen15747693143719">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: DCD2FC9CAB78000001438B8A9C898B79
x-amz-id-2: DB/qBZmbN6AIoX9mrrSNYdLxwvbO0tLR/l6/XKTT4NmZspzhWrwp5Z74ybAYVOgr
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: application/xml
x-amz-version-id: AAABQ4uKnOrc0vycq3gAAAAFVURTRkha
x-amz-copy-source-version-id: AAABQ4uBLdLc0vycq3gAAAAEVURTRkha
Date: Mon, 13 Jan 2014 12:19:14 GMT
Transfer-Encoding: chunked
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;CopyObjectResult xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;LastModified&gt;2014-01-13T12:19:13.770Z&lt;/LastModified&gt;
&lt;ETag&gt;"ba1f2511fc30423bdbb183fe33f3dd0f"&lt;/ETag&gt;
&lt;/CopyObjectResult&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section13636834"><h4 class="sectiontitle">Sample Request (Copying an Object with Version ID Specified to a Bucket with Versioning Suspended)</h4><pre class="screen" id="EN-US_TOPIC_0125560348__screen41277481112733">PUT /object03 HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Host: bucketname.obs.example.com
Accept: */*
Date: Mon, 13 Jan 2014 12:30:11 +0000
Authorization: AWS C5780CDE717D50F4CDAA:TzFaMXTynxWqPdhhRy9l/8Litb8=
x-amz-copy-source: versionbucket/srcobject?versionId=AAABQ4uBLdLc0vycq3gAAAAEVURTRkha</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560348__section55622644"><h4 class="sectiontitle">Sample Response (Copying an Object with Version ID Specified to a Bucket with Versioning Suspended)</h4><pre class="screen" id="EN-US_TOPIC_0125560348__screen3638920143939">HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: DCD2FC9CAB78000001438B94A6CE90D3
x-amz-id-2: ITdGwAvGXezuPzC6m87LVpk2F0i6P5W8GxhBOhmwdf03VjrcL/OXSeOlTpnTLnJy
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: application/xml
x-amz-version-id: null
Date: Mon, 13 Jan 2014 12:30:11 GMT
Transfer-Encoding: chunked
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;CopyObjectResult xmlns="http://obs.example.com/doc/2015-06-30/"&gt;
&lt;LastModified&gt;2014-01-13T12:30:11.690Z&lt;/LastModified&gt;
&lt;ETag&gt;"ba1f2511fc30423bdbb183fe33f3dd0f"&lt;/ETag&gt;
&lt;/CopyObjectResult&gt;</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0125560489.html">Operations on Objects</a></div>
</div>
</div>