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>
806 lines
72 KiB
HTML
806 lines
72 KiB
HTML
<a name="obs_04_0080"></a><a name="obs_04_0080"></a>
|
|
|
|
<h1 class="topictitle1">Uploading an Object - PUT</h1>
|
|
<div id="body25727187"><div class="section" id="obs_04_0080__section5584184924715"><h4 class="sectiontitle">Functions</h4><p class="msonormal" id="obs_04_0080__p57130901">After creating a bucket in OBS, you can use this operation to upload an object to the bucket. This operation uploads an object to a bucket. To use this operation, you must have the write permission for the bucket.</p>
|
|
<div class="note" id="obs_04_0080__note44416069"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p class="text" id="obs_04_0080__p30218092">The name of each object in a bucket must be unique.</p>
|
|
</div></div>
|
|
<p class="msonormal" id="obs_04_0080__p148472556134">With versioning not enabled, if an object to be uploaded has the same name as an existing object in the bucket, the newly uploaded object will overwrite the existing one. To protect data from being corrupted during transmission, you can add the <strong id="obs_04_0080__b736611115814">Content-MD5</strong> header in the request. After receiving the uploaded object, OBS compares the provided MD5 value to the MD5 value it calculates. If the two values do not match, OBS reports an error.</p>
|
|
<p class="msonormal" id="obs_04_0080__p64200303">You can also specify the value of the <strong id="obs_04_0080__b1461685225154325">x-obs-acl</strong> parameter to configure an access control policy for the object. If the <strong id="obs_04_0080__b8947184165818">x-obs-acl</strong> parameter is not specified when an anonymous user uploads an object, the object can be accessed by all OBS users by default.</p>
|
|
<p class="msonormal" id="obs_04_0080__p40931822">This operation supports server-side encryption.</p>
|
|
<p id="obs_04_0080__p1017591824310">For a single upload, the size of the object to be uploaded ranges [0, 5 GB]. To upload a file greater than 5 GB, see <a href="obs_04_0096.html">Operations on Multipart Upload</a>.</p>
|
|
<p id="obs_04_0080__p1130673486">OBS does not have real folders. To facilitate data management, OBS provides a method to simulate a folder by adding a slash (/) to the object name, for example, <strong id="obs_04_0080__b16916144518106">test/123.jpg</strong>. You can simulate <strong id="obs_04_0080__b1183114613107">test</strong> as a folder and <strong id="obs_04_0080__b183314461104">123.jpg</strong> as the name of a file under the <strong id="obs_04_0080__b19834154641019">test</strong> folder. However, the object key remains <strong id="obs_04_0080__b148351346101015">test/123.jpg</strong>. Objects named in this format appear as folders on the console. When you upload an object larger than 0 in size using this format, an empty folder will be displayed on the console, but the occupied storage capacity is the actual object size.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section9125142514612"><h4 class="sectiontitle">Differences Between PUT and POST Methods</h4><p id="obs_04_0080__p154258324469">Parameters are passed through the request header if the PUT method is used to upload objects; if the POST method is used to upload objects, parameters are passed through the form field in the message body.</p>
|
|
<p id="obs_04_0080__p92971585546">With the PUT method, you need to specify the object name in the URL, but object name is not required with the POST method, which uses the bucket domain name as the URL. Request lines of these two methods are given as follows:</p>
|
|
<pre class="screen" id="obs_04_0080__screen53331759111919">PUT /ObjectName HTTP/1.1</pre>
|
|
<pre class="screen" id="obs_04_0080__screen666703202019">POST / HTTP/1.1</pre>
|
|
<p id="obs_04_0080__p62431152115613">For details about POST upload, see <a href="obs_04_0081.html">Uploading an Object - POST</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section27143284"><h4 class="sectiontitle">Versioning</h4><p class="msonormal" id="obs_04_0080__p31746393">If versioning is enabled for a bucket, 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_0080__b38890115">x-obs-version-id</strong>. If versioning is suspended for the bucket, the object version ID is <strong id="obs_04_0080__b4762183545911">null</strong>. For details about the versioning statuses of a bucket, see <a href="obs_04_0037.html">Configuring Versioning for a Bucket</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section1475721115541"><h4 class="sectiontitle">WORM</h4><p id="obs_04_0080__p759131755418">If a bucket has WORM enabled, you can configure retention policies for objects in the bucket. You can specify the <strong id="obs_04_0080__b1821612513390">x-obs-object-lock-mode</strong> and <strong id="obs_04_0080__b378111773910">x-obs-object-lock-retain-until-date</strong> headers to configure a retention policy when you upload 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 uploaded. You can also configure or update a WORM retention policy for an existing object.</p>
|
|
<div class="note" id="obs_04_0080__note143221114511"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_04_0080__p1277512964714">When you enable WORM for a bucket, OBS automatically enables versioning for the bucket. WORM protects objects based on the object version IDs. Only object versions with any WORM retention policy configured will be protected. Assume that object <strong id="obs_04_0080__b86122918189">test.txt 001</strong> is protected by WORM. If another file with the same name is uploaded, a new object version <strong id="obs_04_0080__b1110331181915">test.txt 002</strong> with no WORM policy configured will be generated. In such case, <strong id="obs_04_0080__b5285134217204">test.txt 002</strong> is not protected and can be deleted. When you download an object without specifying a version ID, the current object version (<strong id="obs_04_0080__b863463619217">test.txt 002</strong>) will be downloaded.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section42962965"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen49284209"><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></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/ObjectName<span class="w"> </span>HTTP/1.1<span class="w"> </span>
|
|
Host:<span class="w"> </span>bucketname.obs.region.example.com
|
|
Content-Type:<span class="w"> </span>application/xml<span class="w"> </span>
|
|
Content-Length:<span class="w"> </span>length
|
|
Authorization:<span class="w"> </span>authorization
|
|
Date:<span class="w"> </span>date
|
|
<span class="nt"><Optional</span><span class="w"> </span><span class="err">Additional</span><span class="w"> </span><span class="err">Header</span><span class="nt">></span><span class="w"> </span>
|
|
<span class="nt"><object</span><span class="w"> </span><span class="err">Content</span><span class="nt">></span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section51122366"><h4 class="sectiontitle">Request Parameters</h4><p class="msonormal" id="obs_04_0080__p42790668">This request contains no parameters.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section57448112"><h4 class="sectiontitle">Request Headers</h4><p class="msonormal" id="obs_04_0080__p43492103">This request uses common headers. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>. The request can use additional headers shown in <a href="#obs_04_0080__table5707453135616">Table 1</a>.</p>
|
|
<div class="note" id="obs_04_0080__note4512153213375"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_04_0080__p051243219372">OBS supports the six HTTP request headers: Cache-Control, Expires, Content-Encoding, Content-Disposition, Content-Type, and Content-Language. If these headers are carried in an object upload request, their values are saved. You can also call the metadata modification API, provided by OBS, to change the values of the six headers. When the object is downloaded or queried, the saved values are set for corresponding HTTP headers and returned to the client.</p>
|
|
</div></div>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0080__table5707453135616"></a><a name="table5707453135616"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0080__table5707453135616" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request headers</caption><thead align="left"><tr id="obs_04_0080__row12707155365619"><th align="left" class="cellrowborder" valign="top" width="15.4%" id="mcps1.3.7.4.2.5.1.1"><p id="obs_04_0080__p1770705316562">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.15%" id="mcps1.3.7.4.2.5.1.2"><p id="obs_04_0080__p19923181265714"><strong id="obs_04_0080__b11962163805511">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10.280000000000001%" id="mcps1.3.7.4.2.5.1.3"><p id="obs_04_0080__p489477145720"><strong id="obs_04_0080__b831481412518">Mandatory (Yes/No)</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="61.17%" id="mcps1.3.7.4.2.5.1.4"><p id="obs_04_0080__p27071153175615">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0080__row137071553105614"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p57071153135616">Content-MD5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p0923912205717">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p629153315717">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p4277941144817"><strong id="obs_04_0080__b202815860183810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p12707653175615">Base64-encoded 128-bit MD5 digest of the message according to RFC 1864.</p>
|
|
<p id="obs_04_0080__p570718536561">Example: <strong id="obs_04_0080__b385510536286">n58IG6hfM7vqI4K0vnWpog==</strong></p>
|
|
<p id="obs_04_0080__p11200352171010"><strong id="obs_04_0080__b1061359175913">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p9200155271018">None</p>
|
|
<p id="obs_04_0080__p02008527104"><strong id="obs_04_0080__b62001652141016">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p22001524108">None</p>
|
|
<p id="obs_04_0080__p14200115214102"><strong id="obs_04_0080__b1020013524107">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p0200352171017">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row197077534564"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p570735317567">x-obs-acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p99230121573">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p42911331577">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p1473816514456"><strong id="obs_04_0080__b116109025283810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p7707135313563">When creating an object, you can use this parameter to set a pre-defined ACL.</p>
|
|
<p id="obs_04_0080__p87383520456"><strong id="obs_04_0080__b031562404">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p111285510261">Pre-defined policies must be displayed in character strings.</p>
|
|
<p id="obs_04_0080__p19473154006"><strong id="obs_04_0080__b14473115414011">Value range</strong>:</p>
|
|
<ul id="obs_04_0080__ul327580134417"><li id="obs_04_0080__li62751402443">private</li><li id="obs_04_0080__li4275001448">public-read</li><li id="obs_04_0080__li152754094416">public-read-write</li></ul>
|
|
<p id="obs_04_0080__p8293148164311"></p>
|
|
<p id="obs_04_0080__p8473354005"><strong id="obs_04_0080__b1747315541806">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p47489020337">private</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row5707105312569"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p1170715335617">x-obs-grant-read</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p109238122572">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p192912033175715">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p84521086453"><strong id="obs_04_0080__b46581438583810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p15707165319561">When creating an object, you can use this header to grant all users in a domain the permissions to read the object and obtain the object metadata.</p>
|
|
<p id="obs_04_0080__p355623518268">Example: <strong id="obs_04_0080__b1938316261948">x-obs-grant-read: id=</strong><em id="obs_04_0080__i1738318264411">domainID</em></p>
|
|
<p id="obs_04_0080__p184536819455"><strong id="obs_04_0080__b64672412013">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p1348464342611">If multiple domains are authorized, separate them with commas (,).</p>
|
|
<p id="obs_04_0080__p9542172312114"><strong id="obs_04_0080__b4542202318111">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p151031955161514">The value must be a valid ID. For details, see <a href="obs_04_0117.html">Obtaining a Domain ID and a User ID</a>.</p>
|
|
<p id="obs_04_0080__p135436234110"><strong id="obs_04_0080__b25431223191113">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p1154382321120">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row17071653175616"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p170711535561">x-obs-grant-read-acp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p89237129577">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p6291933135717">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p19142181111452"><strong id="obs_04_0080__b28295122183810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p18707553135614">When creating an object, you can use this header to grant all users in a domain the permissions to obtain the object ACL.</p>
|
|
<p id="obs_04_0080__p1179445692615">Example: <strong id="obs_04_0080__b204551461550">x-obs-grant-read-acp: id=</strong><em id="obs_04_0080__i1045596355">domainID</em></p>
|
|
<p id="obs_04_0080__p161421111174519"><strong id="obs_04_0080__b5444961808">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p07071253105618">If multiple domains are authorized, separate them with commas (,).</p>
|
|
<p id="obs_04_0080__p207472355163"><strong id="obs_04_0080__b1574713501614">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p1574743518163">The value must be a valid ID. For details, see <a href="obs_04_0117.html">Obtaining a Domain ID and a User ID</a>.</p>
|
|
<p id="obs_04_0080__p674717352164"><strong id="obs_04_0080__b1747183517165">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p1874783517163">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row1470795395618"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p5707125315616">x-obs-grant-write-acp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p9923141215715">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p829113315572">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p126381513104511"><strong id="obs_04_0080__b84958680183810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p8707253195619">When creating an object, you can use this header to grant all users in a domain the permission to write the object ACL.</p>
|
|
<p id="obs_04_0080__p17871191052710">Example: <strong id="obs_04_0080__b523151815514">x-obs-grant-write-acp: id=</strong><em id="obs_04_0080__i0231318955">domainID</em></p>
|
|
<p id="obs_04_0080__p1663841384515"><strong id="obs_04_0080__b1038048600">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p04167158279">If multiple domains are authorized, separate them with commas (,).</p>
|
|
<p id="obs_04_0080__p115517391166"><strong id="obs_04_0080__b1415523917169">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p1115513961610">The value must be a valid ID. For details, see <a href="obs_04_0117.html">Obtaining a Domain ID and a User ID</a>.</p>
|
|
<p id="obs_04_0080__p315510396165"><strong id="obs_04_0080__b1515516396161">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p7155173951614">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row14708175315619"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p3708185365612">x-obs-grant-full-control</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p7608185182111">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p11291193312576">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p14853168451"><strong id="obs_04_0080__b54724564483810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p1970805305615">When creating an object, you can use this header to grant all users in a domain the permissions to read the object, obtain the object metadata and ACL, and write the object ACL.</p>
|
|
<p id="obs_04_0080__p97904262272">Example: <strong id="obs_04_0080__b222723511589">x-obs-grant-full-control: id=</strong><em id="obs_04_0080__i46551237165813">domainID</em></p>
|
|
<p id="obs_04_0080__p8485816114520"><strong id="obs_04_0080__b5212111019018">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p11708165316565">If multiple domains are authorized, separate them with commas (,).</p>
|
|
<p id="obs_04_0080__p16252442111615"><strong id="obs_04_0080__b4252842121612">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p16252174213169">The value must be a valid ID. For details, see <a href="obs_04_0117.html">Obtaining a Domain ID and a User ID</a>.</p>
|
|
<p id="obs_04_0080__p182521742181615"><strong id="obs_04_0080__b0252242191615">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p9252134241616">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row7708145311564"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p157086538564">x-obs-storage-class</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p1941131772118">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p4291163345711">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p12835624134517"><strong id="obs_04_0080__b63143042683810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p1708115313569">When creating 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 bucket.</p>
|
|
<p id="obs_04_0080__p16708753165610">Example: <strong id="obs_04_0080__b98500285291">x-obs-storage-class: STANDARD</strong></p>
|
|
<p id="obs_04_0080__p17835102413455"><strong id="obs_04_0080__b1392517101611">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p427615510485">The value is case-sensitive.</p>
|
|
<p id="obs_04_0080__p08359243452"><strong id="obs_04_0080__b104170176184044">Value range</strong>:</p>
|
|
<ul id="obs_04_0080__ul213814771812"><li id="obs_04_0080__li21386713186">STANDARD</li><li id="obs_04_0080__li2013811751817">WARM</li><li id="obs_04_0080__li1913812781811">COLD</li></ul>
|
|
<p id="obs_04_0080__p1483514243453"><strong id="obs_04_0080__b88787590084136">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p1718352420173">By default, the storage class of the bucket is inherited.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row1170813531566"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p670885355617">x-obs-meta-*</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p209561719172110">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p1329115332578">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p10311103014515"><strong id="obs_04_0080__b210600910683810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p117081553205619">When creating an object, you can use a header starting with <strong id="obs_04_0080__b1877839519">x-obs-meta-</strong> to define object metadata in an HTTP request. The custom metadata will be returned in the response when you retrieve the object or query the object metadata. </p>
|
|
<p id="obs_04_0080__p127081532563">Example: <strong id="obs_04_0080__b846664911">x-obs-meta-test: test metadata</strong></p>
|
|
<p id="obs_04_0080__p15525627194918"><strong id="obs_04_0080__b1937130589">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p6311123054512">Both custom metadata keys and their values must conform to US-ASCII standards.</p>
|
|
<p id="obs_04_0080__p1437005318181"><strong id="obs_04_0080__b133701538185">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p1737015310185">None</p>
|
|
<p id="obs_04_0080__p337012538188"><strong id="obs_04_0080__b2370953191815">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p937018532185">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row12709753105610"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p2709205318560">x-obs-website-redirect-location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p565523319217">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p1229203335714">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p1663183774510"><strong id="obs_04_0080__b24054536883810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p170955313564">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_0080__p1770945316563">In the following example, the request header sets the redirection to an object (<strong id="obs_04_0080__b182638495">anotherPage.html</strong>) in the same bucket:</p>
|
|
<p id="obs_04_0080__p1470925317569">x-obs-website-redirect-location:/anotherPage.html</p>
|
|
<p id="obs_04_0080__p770965325617">In the following example, the request header sets the object redirection to an external URL:</p>
|
|
<p id="obs_04_0080__p16974520114317">x-obs-website-redirect-location:http://www.example.com/</p>
|
|
<p id="obs_04_0080__p366310373454"><strong id="obs_04_0080__b337261420019">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p041993711433">The value must start with a slash (/), <strong id="obs_04_0080__b115041526143013">http://</strong>, or <strong id="obs_04_0080__b0505626113011">https://</strong> and cannot exceed 2 KB.</p>
|
|
<p id="obs_04_0080__p1171210126194"><strong id="obs_04_0080__b197121212181918">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p971211128196">None</p>
|
|
<p id="obs_04_0080__p1271271215195"><strong id="obs_04_0080__b17128124197">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p67126124191">None </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row7709135317563"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p1470945318567">x-obs-server-side-encryption</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p1113284420215">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p1629219338572">No. This header is required when SSE-KMS is used.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p1456825212455"><strong id="obs_04_0080__b8174270583810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p8709105365615">Indicates that SSE-KMS is used. </p>
|
|
<p id="obs_04_0080__p1470915533563">Example: <strong id="obs_04_0080__b1431733083011">x-obs-server-side-encryption: kms</strong></p>
|
|
<p id="obs_04_0080__p8656123181910"><strong id="obs_04_0080__b1281991052">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p15656172311193">None</p>
|
|
<p id="obs_04_0080__p106564234196"><strong id="obs_04_0080__b11656152351918">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p1365622311199">kms, or AES256</p>
|
|
<p id="obs_04_0080__p12656172341915"><strong id="obs_04_0080__b6656142331918">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p1865692381913">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row18709105305611"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p8709115312566">x-obs-server-side-encryption-kms-key-id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p159241412125715">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p192921433145716">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p1753512571813"><strong id="obs_04_0080__b1380133042414">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p205358571889">ID of a specified key used for SSE-KMS encryption.</p>
|
|
<p id="obs_04_0080__p135361957886"><strong id="obs_04_0080__b5336523132914">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p153618578818">This header can only be used when you specify <strong id="obs_04_0080__b107232019173">kms</strong> for the <strong id="obs_04_0080__b1872112020175">x-obs-server-side-encryption</strong> header.</p>
|
|
<p id="obs_04_0080__p11536557683"><strong id="obs_04_0080__b1357613306297">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p17536857783">If you specify <strong id="obs_04_0080__b1518452319172">kms</strong> for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row671017532561"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p271025315610">x-obs-server-side-encryption-customer-algorithm</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p781371182214">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p1629253365718">No. This header is required when SSE-C is used.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p3616204612"><strong id="obs_04_0080__b67141610083810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p4710115335613">The algorithm used for encryption.</p>
|
|
<p id="obs_04_0080__p9710155355613">Example: <strong id="obs_04_0080__b668986342">x-obs-server-side-encryption-customer-algorithm: AES256</strong></p>
|
|
<p id="obs_04_0080__p461192174617"><strong id="obs_04_0080__b168991518605">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0080__ul176151473513"><li id="obs_04_0080__li10615114714510">This header is used only when SSE-C is used.</li><li id="obs_04_0080__li761504725111">This header must be used together with <strong id="obs_04_0080__b238472411169">x-obs-server-side-encryption-customer-key</strong> and <strong id="obs_04_0080__b73846247166">x-obs-server-side-encryption-customer-key-MD5</strong>.</li></ul>
|
|
<p id="obs_04_0080__p858733862012"><strong id="obs_04_0080__b13587163814203">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p105871538142011">AES256</p>
|
|
<p id="obs_04_0080__p20587153814202"><strong id="obs_04_0080__b35878386208">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p18587238142016">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row271045305616"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p167107536564">x-obs-server-side-encryption-customer-key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p10620105132220">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p162921233165712">No. This header is required when SSE-C is used.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p1583446466"><strong id="obs_04_0080__b61065484983810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p127104531564">The key used for encrypting an object.</p>
|
|
<p id="obs_04_0080__p1371065317568">Example: <strong id="obs_04_0080__b1367341028">x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=</strong></p>
|
|
<p id="obs_04_0080__p1458315416467"><strong id="obs_04_0080__b39641120101">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0080__ul9757917185313"><li id="obs_04_0080__li57578175536">This header is used only when SSE-C is used.</li><li id="obs_04_0080__li4757171712534">This header is a Base64-encoded 256-bit key and must be used together with <strong id="obs_04_0080__b122472412179">x-obs-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0080__b15247541161712">x-obs-server-side-encryption-customer-key-MD5</strong>.</li></ul>
|
|
<p id="obs_04_0080__p117228557205"><strong id="obs_04_0080__b9722055192015">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p9722175517203">None</p>
|
|
<p id="obs_04_0080__p97222559204"><strong id="obs_04_0080__b157221455162010">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p0722955202010">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row14710153115618"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p571019534564">x-obs-server-side-encryption-customer-key-MD5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p56161911152212">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p729243318573">No. This header is required when SSE-C is used.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p5350884463"><strong id="obs_04_0080__b169532915183810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p471065385619">The MD5 value of the key used for encryption. The MD5 value is used to check whether any error occurs during the transmission of the key. </p>
|
|
<p id="obs_04_0080__p14710125325614">Example: <strong id="obs_04_0080__b1696546643">x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
|
|
<p id="obs_04_0080__p63501382466"><strong id="obs_04_0080__b1970455101">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0080__ul643810318531"><li id="obs_04_0080__li11438163119534">This header is used only when SSE-C is used.</li><li id="obs_04_0080__li1943823118532">This header is a Base64-encoded 128-bit MD5 value and must be used together with <strong id="obs_04_0080__b1062112531812">x-obs-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0080__b26392518187">x-obs-server-side-encryption-customer-key</strong>.</li></ul>
|
|
<p id="obs_04_0080__p11710175382120"><strong id="obs_04_0080__b197119533211">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p177119534212">MD5 value of the key.</p>
|
|
<p id="obs_04_0080__p27118537218"><strong id="obs_04_0080__b471155382117">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p671125316216">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row771019538565"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p127101653185618">success-action-redirect</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p18571101622215">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p7292163325713">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p4341131174619"><strong id="obs_04_0080__b197758109483810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p1871065311566">The redirection address used when requests were successfully responded to.</p>
|
|
<ul id="obs_04_0080__ul1271013535563"><li id="obs_04_0080__li1971035311567">If the value is valid and the request is successful, OBS returns status code 303. <strong id="obs_04_0080__b2097119530">Location</strong> contains <strong id="obs_04_0080__b2071840527">success_action_redirect</strong> as well as the bucket name, object name, and object ETag.</li><li id="obs_04_0080__li18710353175618">If this parameter value is invalid, OBS ignores this parameter. In such case, the <strong id="obs_04_0080__b1147818911">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_0080__p1438816192228"><strong id="obs_04_0080__b469494461">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p93881919102219">The value must be a valid URL, for example, <strong id="obs_04_0080__b1613316277207">http://</strong><em id="obs_04_0080__i04607304202">domainname</em> or <strong id="obs_04_0080__b36201733132012">https://</strong><em id="obs_04_0080__i7460153618203">domainname</em>.</p>
|
|
<p id="obs_04_0080__p193881019142218"><strong id="obs_04_0080__b113881819152210">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p9388161912211">URL</p>
|
|
<p id="obs_04_0080__p183881519112213"><strong id="obs_04_0080__b2388219152212">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p1738821972212">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row2710135365614"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p771013532568">x-obs-expires</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p66119232220">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p1292143313572">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p62462148461"><strong id="obs_04_0080__b180115967483810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p167109537563">Specifies when an object expires. It is measured in days. Once the object expires, it is automatically deleted. (The validity calculates from the object's creation time.)</p>
|
|
<p id="obs_04_0080__p11710253115613">You can configure this field when uploading an object or modify this field by using the metadata modification API after the object is uploaded.</p>
|
|
<p id="obs_04_0080__p187101353135617">Example: <strong id="obs_04_0080__b1071615411319">x-obs-expires:3</strong></p>
|
|
<p id="obs_04_0080__p156315261238"><strong id="obs_04_0080__b387240329">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p763142613237">The value must be greater than the number of days that have passed since the object was created. For example, if the object was uploaded 10 days ago, you must specify a value greater than 10.</p>
|
|
<p id="obs_04_0080__p11631326122320"><strong id="obs_04_0080__b463172632310">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p196314269232">The value is an integer greater than 0.</p>
|
|
<p id="obs_04_0080__p86311326112312"><strong id="obs_04_0080__b166311526162314">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p136316262237">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row18711175375617"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p10711853165610">x-obs-tagging</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p2041830182218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p132921733155719">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p880111715466"><strong id="obs_04_0080__b168174547283810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p11210177463">Object's tag information in key-value pairs. Multiple tags can be added at the same time.</p>
|
|
<p id="obs_04_0080__p371145313567">Example: <strong id="obs_04_0080__b1698819815316">x-obs-tagging:TagA=A&TagB&TagC</strong></p>
|
|
<p id="obs_04_0080__p1980217164618"><strong id="obs_04_0080__b112052232010">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0080__ul5711115314567"><li id="obs_04_0080__li15711753145610">If a tag key or value contains special characters, equal signs (=), or full-width characters, it must be URL-encoded.</li><li id="obs_04_0080__li18711205325612">If there is no equal sign (=) in a configuration, the tag value is considered left blank.</li></ul>
|
|
<p id="obs_04_0080__p48121711464"><strong id="obs_04_0080__b189324324884044">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p4681111562410">None</p>
|
|
<p id="obs_04_0080__p4811917164619"><strong id="obs_04_0080__b122257045284136">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p65732176242">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row7711175313567"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p16711753145618">x-obs-object-lock-mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p209245123576">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p929212331572">No, but required when <strong id="obs_04_0080__b2239316193114">x-obs-object-lock-retain-until-date</strong> is present</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p834114214243"><strong id="obs_04_0080__b1949428378">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p4342424243">WORM mode applied to the object.</p>
|
|
<p id="obs_04_0080__p19341642192418">Example: <strong id="obs_04_0080__b718271443102611">x-obs-object-lock-mode:COMPLIANCE</strong></p>
|
|
<p id="obs_04_0080__p53444213245"><strong id="obs_04_0080__b2042010337">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0080__ul123412425243"><li id="obs_04_0080__li1334194212243">Only COMPLIANCE (compliance mode) is supported.</li><li id="obs_04_0080__li203454232411">This parameter must be used together with <strong id="obs_04_0080__b1725604016154">x-obs-object-lock-retain-until-date</strong>.</li></ul>
|
|
<p id="obs_04_0080__p334442102418"><strong id="obs_04_0080__b83411428247">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p43415420244">COMPLIANCE</p>
|
|
<p id="obs_04_0080__p113414292415"><strong id="obs_04_0080__b153434252415">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p103414216241">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row371120536562"><td class="cellrowborder" valign="top" width="15.4%" headers="mcps1.3.7.4.2.5.1.1 "><p id="obs_04_0080__p571116535568">x-obs-object-lock-retain-until-date</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.15%" headers="mcps1.3.7.4.2.5.1.2 "><p id="obs_04_0080__p17924151255711">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.280000000000001%" headers="mcps1.3.7.4.2.5.1.3 "><p id="obs_04_0080__p14292103355710">No, but required when <strong id="obs_04_0080__b438547180">x-obs-object-lock-mode</strong> is present.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.17%" headers="mcps1.3.7.4.2.5.1.4 "><p id="obs_04_0080__p141326316252"><strong id="obs_04_0080__b1826582731">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p21329382512">When the WORM policy of the object expires.</p>
|
|
<p id="obs_04_0080__p1113218317252">Example: <strong id="obs_04_0080__b488263506102611">x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z</strong></p>
|
|
<p id="obs_04_0080__p7132163122517"><strong id="obs_04_0080__b985975116">Restrictions</strong>:</p>
|
|
<ul id="obs_04_0080__ul1013212313258"><li id="obs_04_0080__li1113218302518">The value must be a UTC time that complies with the ISO 8601 standard. Example: <strong id="obs_04_0080__b14490183518191">2015-07-01T04:11:15Z</strong></li><li id="obs_04_0080__li713283142518">This parameter must be used together with <strong id="obs_04_0080__b57601743151914">x-obs-object-lock-mode</strong>.</li></ul>
|
|
<p id="obs_04_0080__p121323313254"><strong id="obs_04_0080__b413220310258">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p31321838256">The time must be later than the current time.</p>
|
|
<p id="obs_04_0080__p16132173102518"><strong id="obs_04_0080__b81328312250">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p1813216317259">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section47270964"><h4 class="sectiontitle">Request Elements</h4><p class="msonormal" id="obs_04_0080__p15133969">This request contains no elements. Its body contains only the content of the requested object.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section22785500"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen17891949"><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></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
|
|
Content-Length:<span class="w"> </span>length
|
|
Content-Type:<span class="w"> </span>type
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section3742912"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0080__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_0080__p30613480">In addition to the common response headers, the headers listed in <a href="#obs_04_0080__table8930193215584">Table 2</a> might also be needed.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0080__table8930193215584"></a><a name="table8930193215584"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0080__table8930193215584" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Additional response headers</caption><thead align="left"><tr id="obs_04_0080__row693120327585"><th align="left" class="cellrowborder" valign="top" width="29.39%" id="mcps1.3.10.4.2.4.1.1"><p id="obs_04_0080__p1693153216585">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10.68%" id="mcps1.3.10.4.2.4.1.2"><p id="obs_04_0080__p1924954714585"><strong id="obs_04_0080__b32102340210">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="59.93000000000001%" id="mcps1.3.10.4.2.4.1.3"><p id="obs_04_0080__p1693183245818"><strong id="obs_04_0080__b162762543314">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0080__row7931143285818"><td class="cellrowborder" valign="top" width="29.39%" headers="mcps1.3.10.4.2.4.1.1 "><p id="obs_04_0080__p99311132165819">x-obs-version-id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.68%" headers="mcps1.3.10.4.2.4.1.2 "><p id="obs_04_0080__p11249247115812">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.93000000000001%" headers="mcps1.3.10.4.2.4.1.3 "><p id="obs_04_0080__p53831610114811"><strong id="obs_04_0080__b102913391083810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p993117325586">Version ID of the object. If versioning is enabled for the bucket, the object version ID will be returned.</p>
|
|
<p id="obs_04_0080__p6383171013488"><strong id="obs_04_0080__b1826595585">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p1752617137566">None</p>
|
|
<p id="obs_04_0080__p1538371084813"><strong id="obs_04_0080__b61962997084044">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p57716513257">None</p>
|
|
<p id="obs_04_0080__p2038371017485"><strong id="obs_04_0080__b160539297184136">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p10278175211258">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row16931193219589"><td class="cellrowborder" valign="top" width="29.39%" headers="mcps1.3.10.4.2.4.1.1 "><p id="obs_04_0080__p1931133295819">x-obs-server-side-encryption</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.68%" headers="mcps1.3.10.4.2.4.1.2 "><p id="obs_04_0080__p192491147145814">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.93000000000001%" headers="mcps1.3.10.4.2.4.1.3 "><p id="obs_04_0080__p202417719265"><strong id="obs_04_0080__b2017265388">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p02414713269">The encryption method used by the server.</p>
|
|
<p id="obs_04_0080__p17248712615">Example: <strong id="obs_04_0080__b1044445093">x-obs-server-side-encryption:kms</strong></p>
|
|
<p id="obs_04_0080__p0249716265"><strong id="obs_04_0080__b403685009">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p32477172616">This header is included in a response if SSE-KMS is used. </p>
|
|
<p id="obs_04_0080__p152497182618"><strong id="obs_04_0080__b32417732614">Value range</strong>:</p>
|
|
<ul id="obs_04_0080__ul22922013152613"><li id="obs_04_0080__li8292113152613">kms</li><li id="obs_04_0080__li329251302612">AES256</li></ul>
|
|
<p id="obs_04_0080__p1624147202615"><strong id="obs_04_0080__b2024117192618">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p19242720266">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row139321032155813"><td class="cellrowborder" valign="top" width="29.39%" headers="mcps1.3.10.4.2.4.1.1 "><p id="obs_04_0080__p993210329587">x-obs-server-side-encryption-kms-key-id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.68%" headers="mcps1.3.10.4.2.4.1.2 "><p id="obs_04_0080__p6249154785815">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.93000000000001%" headers="mcps1.3.10.4.2.4.1.3 "><p id="obs_04_0080__p513962717132"><strong id="obs_04_0080__b25717373532">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p1314072711131">ID of a specified key used for SSE-KMS encryption.</p>
|
|
<p id="obs_04_0080__p41401827171313"><strong id="obs_04_0080__b1357724645316">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p18140727181315">This header can only be used when you specify <strong id="obs_04_0080__b1657715333179">kms</strong> for the <strong id="obs_04_0080__b12577533131718">x-obs-server-side-encryption</strong> header.</p>
|
|
<p id="obs_04_0080__p10140112713135"><strong id="obs_04_0080__b03455595312">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p4140192731313">If you specify <strong id="obs_04_0080__b206447985291321">kms</strong> for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row993223211583"><td class="cellrowborder" valign="top" width="29.39%" headers="mcps1.3.10.4.2.4.1.1 "><p id="obs_04_0080__p1493253215584">x-obs-server-side-encryption-customer-algorithm</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.68%" headers="mcps1.3.10.4.2.4.1.2 "><p id="obs_04_0080__p10249047145811">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.93000000000001%" headers="mcps1.3.10.4.2.4.1.3 "><p id="obs_04_0080__p169931717164810"><strong id="obs_04_0080__b128972912383810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p179329321586">The algorithm used for encryption.</p>
|
|
<p id="obs_04_0080__p69326324587">Example: <strong id="obs_04_0080__b1912973318">x-obs-server-side-encryption-customer-algorithm: AES256</strong></p>
|
|
<p id="obs_04_0080__p1499391794816"><strong id="obs_04_0080__b1523965568">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p223445112515">This header is included in a response if SSE-C is used for server-side encryption.</p>
|
|
<p id="obs_04_0080__p313925172715"><strong id="obs_04_0080__b15139185112716">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p13139125132712">AES256</p>
|
|
<p id="obs_04_0080__p614010514277"><strong id="obs_04_0080__b414014532710">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p151408513272">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row093217325582"><td class="cellrowborder" valign="top" width="29.39%" headers="mcps1.3.10.4.2.4.1.1 "><p id="obs_04_0080__p12932132145817">x-obs-server-side-encryption-customer-key-MD5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.68%" headers="mcps1.3.10.4.2.4.1.2 "><p id="obs_04_0080__p724964785816">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.93000000000001%" headers="mcps1.3.10.4.2.4.1.3 "><p id="obs_04_0080__p1329910215486"><strong id="obs_04_0080__b67175720183810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p1993203218585">The MD5 value of the key used for encryption.</p>
|
|
<p id="obs_04_0080__p209327320582">Example: <strong id="obs_04_0080__b196512903">x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
|
|
<p id="obs_04_0080__p172992212480"><strong id="obs_04_0080__b1072401257">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p114931111869">This header is included in a response if SSE-C is used for server-side encryption.</p>
|
|
<p id="obs_04_0080__p931102062711"><strong id="obs_04_0080__b531420122715">Value range</strong>:</p>
|
|
<p id="obs_04_0080__p53182002719">MD5 value of the key.</p>
|
|
<p id="obs_04_0080__p831720102713"><strong id="obs_04_0080__b6315202278">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p8317204277">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0080__row1293213328581"><td class="cellrowborder" valign="top" width="29.39%" headers="mcps1.3.10.4.2.4.1.1 "><p id="obs_04_0080__p19933103217585">x-obs-storage-class</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.68%" headers="mcps1.3.10.4.2.4.1.2 "><p id="obs_04_0080__p324914705817">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.93000000000001%" headers="mcps1.3.10.4.2.4.1.3 "><p id="obs_04_0080__p1787417237485"><strong id="obs_04_0080__b107486141683810">Explanation</strong>:</p>
|
|
<p id="obs_04_0080__p369817236487">Storage class of an object</p>
|
|
<p id="obs_04_0080__p887452320481"><strong id="obs_04_0080__b2127902877">Restrictions</strong>:</p>
|
|
<p id="obs_04_0080__p2653291166">This header is returned when the storage class of an object is not Standard.</p>
|
|
<p id="obs_04_0080__p28741223164811"><strong id="obs_04_0080__b41256097284044">Value range</strong>:</p>
|
|
<ul id="obs_04_0080__ul517803415288"><li id="obs_04_0080__li151781034162818">WARM</li><li id="obs_04_0080__li21791434112819">COLD</li></ul>
|
|
<p id="obs_04_0080__p1887411232489"><strong id="obs_04_0080__b90586485884136">Default value</strong>:</p>
|
|
<p id="obs_04_0080__p937412361963">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section33686208"><h4 class="sectiontitle">Response Elements</h4><p class="msonormal" id="obs_04_0080__p10058442">This response contains no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section34740423"><h4 class="sectiontitle">Error Responses</h4><p class="msonormal" id="obs_04_0080__p9427499">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_0080__section14482163815396"><h4 class="sectiontitle">Sample Request: Uploading an Object</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__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>
|
|
<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>/object01<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:11:15<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:gYqplLq30dEX7GMi2qFWyjdFsyw=
|
|
Content-Length:<span class="w"> </span>10240
|
|
Expect:<span class="w"> </span>100-continue
|
|
|
|
[1024<span class="w"> </span>Byte<span class="w"> </span>data<span class="w"> </span>content]
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section11653102613112"><h4 class="sectiontitle">Sample Response: Uploading an Object</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen37481040121111"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>BF2600000164364C10805D385E1E3C67
|
|
ETag:<span class="w"> </span>"d41d8cd98f00b204e9800998ecf8427e"
|
|
x-obs-id-2:<span class="w"> </span>32AAAWJAMAABAAAQAAEAABAAAQAAEAABCTzu4Jp2lquWuXsjnLyPPiT3cfGhqPoY
|
|
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:11:15<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section9978114711117"><h4 class="sectiontitle">Sample Request: Uploading an Object (with the ACL Configured)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen377183710355"><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></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/object01<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:13:55<span class="w"> </span>GMT
|
|
x-obs-grant-read:id=52f24s3593as5730ea4f722483579ai7,id=a93fcas852f24s3596ea8366794f7224
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:gYqplLq30dEX7GMi2qFWyjdFsyw=
|
|
Content-Length:<span class="w"> </span>10240
|
|
Expect:<span class="w"> </span>100-continue
|
|
|
|
[1024<span class="w"> </span>Byte<span class="w"> </span>data<span class="w"> </span>content]
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section17245101261216"><h4 class="sectiontitle">Sample Response: Uploading an Object (with the ACL Configured)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen8485113814"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>BB7800000164845759E4F3B39ABEE55E
|
|
ETag:<span class="w"> </span>"d41d8cd98f00b204e9800998ecf8427e"
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSReVRNuas0knI+Y96iXrZA7BLUgj06Z
|
|
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:13:55<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section18923277137"><h4 class="sectiontitle">Sample Request: Uploading an Object to a Versioned Bucket</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen476312144396"><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></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/object01<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:17:12<span class="w"> </span>GMT
|
|
x-obs-storage-class:<span class="w"> </span>WARM
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:uFVJhp/dJqj/CJIVLrSZ0gpw3ng=
|
|
Content-Length:<span class="w"> </span>10240
|
|
Expect:<span class="w"> </span>100-continue
|
|
|
|
[1024<span class="w"> </span>Byte<span class="w"> </span>data<span class="w"> </span>content]
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section16530173215133"><h4 class="sectiontitle">Sample Response: Uploading an Object to a Versioned Bucket</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen6331341111313"><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></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>DCD2FC9CAB78000001439A51DB2B2577
|
|
ETag:<span class="w"> </span>"d41d8cd98f00b204e9800998ecf8427e"
|
|
X-OBS-ID-2:<span class="w"> </span>GcVgfeOJHx8JZHTHrRqkPsbKdB583fYbr3RBbHT6mMrBstReVILBZbMAdLiBYy1l
|
|
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:17:12<span class="w"> </span>GMT
|
|
x-obs-version-id:<span class="w"> </span>AAABQ4q2M9_c0vycq3gAAAAAVURTRkha
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section17724204519133"><h4 class="sectiontitle">Sample Request: Uploading an Object (with Its MD5 Specified)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen5405153113413"><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></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/object01<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:17:50<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:uFVJhp/dJqj/CJIVLrSZ0gpw3ng=
|
|
Content-Length:<span class="w"> </span>10
|
|
Content-MD5:<span class="w"> </span>6Afx/PgtEy+bsBjKZzihnw==
|
|
Expect:<span class="w"> </span>100-continue
|
|
|
|
1234567890
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section3283216161415"><h4 class="sectiontitle">Sample Response: Uploading an Object (with Its MD5 Specified)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen16848152591416"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>BB7800000164B165971F91D82217D105
|
|
X-OBS-ID-2:<span class="w"> </span>32AAAUJAIAABAAAQAAEAABAAAQAAEAABCSEKhBpS4BB3dSMNqMtuNxQDD9XvOw5h
|
|
ETag:<span class="w"> </span>"1072e1b96b47d7ec859710068aa70d57"
|
|
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:17:50<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section2272113211413"><h4 class="sectiontitle">Sample Request: Uploading an Object (with Website Hosting Configured)</h4><p id="obs_04_0080__p92041612152516"><strong id="obs_04_0080__b34252952419">If static website hosting has been configured for a bucket, you can configure parameters as follows when you upload an object. Then, users will be redirected when they download the object.</strong></p>
|
|
<div class="codecoloring" codetype="Xml" id="obs_04_0080__screen961842162414"><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></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/object01<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:17:12<span class="w"> </span>GMT
|
|
x-obs-website-redirect-location:<span class="w"> </span>http://www.example.com/
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:uFVJhp/dJqj/CJIVLrSZ0gpw3ng=
|
|
Content-Length:<span class="w"> </span>10240
|
|
Expect:<span class="w"> </span>100-continue
|
|
|
|
[1024<span class="w"> </span>Byte<span class="w"> </span>data<span class="w"> </span>content]
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section632052520159"><h4 class="sectiontitle">Sample Response: Uploading an Object (with Website Hosting Configured)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen63684222415"><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></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>DCD2FC9CAB78000001439A51DB2B2577
|
|
x-obs-id-2:<span class="w"> </span>32AAAUJAIAABAAAQAAEAABAAAQAAEAABCTmxB5ufMj/7/GzP8TFwTbp33u0xhn2Z
|
|
ETag:<span class="w"> </span>"1072e1b96b47d7ec859710068aa70d57"
|
|
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:17:12<span class="w"> </span>GMT
|
|
x-obs-version-id:<span class="w"> </span>AAABQ4q2M9_c0vycq3gAAAAAVURTRkha
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section9838237181513"><h4 class="sectiontitle">Sample Request: Uploading an Object Using a Signed URL</h4><pre class="screen" id="obs_04_0080__screen18133558153">PUT /object02?AccessKeyId=H4IPJX0TQTHTHEBQQCEC&Expires=1532688887&Signature=EQmDuOhaLUrzrzRNZxwS72CXeXM%3D HTTP/1.1
|
|
User-Agent: curl/7.29.0
|
|
Host: examplebucket.obs.<em id="obs_04_0080__i1766314309266">region</em>.example.com
|
|
Accept: */*
|
|
Content-Length: 1024
|
|
|
|
<em id="obs_04_0080__i28288554154">[1024 Byte data content]</em></pre>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section96529021618"><h4 class="sectiontitle">Sample Response: Uploading an Object Using a Signed URL</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen1748071011372"><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></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>DCD2FC9CAB78000001439A51DB2B2577
|
|
x-obs-id-2:<span class="w"> </span>32AAAUJAIAABAAAQAAEAABAAAQAAEAABCTmxB5ufMj/7/GzP8TFwTbp33u0xhn2Z
|
|
ETag:<span class="w"> </span>"1072e1b96b47d7ec859710068aa70d57"
|
|
Date:<span class="w"> </span>Fri,<span class="w"> </span>27<span class="w"> </span>Jul<span class="w"> </span>2018<span class="w"> </span>10:52:31<span class="w"> </span>GMT
|
|
x-obs-version-id:<span class="w"> </span>AAABQ4q2M9_c0vycq3gAAAAAVURTRkha
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section74231427201219"><h4 class="sectiontitle">Sample Request: Uploading an Object (with a Storage Class Specified)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen5643202625018"><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></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/object01<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:15:07<span class="w"> </span>GMT
|
|
x-obs-storage-class:<span class="w"> </span>WARM
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:uFVJhp/dJqj/CJIVLrSZ0gpw3ng=
|
|
Content-Length:<span class="w"> </span>10240
|
|
Expect:<span class="w"> </span>100-continue
|
|
|
|
[1024<span class="w"> </span>Byte<span class="w"> </span>data<span class="w"> </span>content]
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section1526805513128"><h4 class="sectiontitle">Sample Response: Uploading an Object (with a Storage Class Specified)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen26626264501"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>BB7800000164846A2112F98BF970AA7E
|
|
ETag:<span class="w"> </span>"d41d8cd98f00b204e9800998ecf8427e"
|
|
x-obs-id-2:<span class="w"> </span>a39E0UgAIAABAAAQAAEAABAAAQAAEAABCTPOUJu5XlNyU32fvKjM/92MQZK2gtoB
|
|
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:15:07<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section66011687493"><h4 class="sectiontitle">Sample Request: Uploading an Object (with a WORM Retention Policy Configured)</h4><pre class="screen" id="obs_04_0080__screen1886417196504">PUT /object01 HTTP/1.1
|
|
User-Agent: curl/7.29.0
|
|
Host: examplebucket.obs.region.example.com
|
|
Accept: */*
|
|
Date: WED, 01 Jul 2015 04:11:15 GMT
|
|
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:gYqplLq30dEX7GMi2qFWyjdFsyw=
|
|
Content-Length: 10240
|
|
x-obs-object-lock-mode:COMPLIANCE
|
|
x-obs-object-lock-retain-until-date:2022-09-24T16:10:25Z
|
|
Expect: 100-continue
|
|
|
|
<em id="obs_04_0080__i499711468508">[1024 Byte data content]</em></pre>
|
|
</div>
|
|
<div class="section" id="obs_04_0080__section1848934125211"><h4 class="sectiontitle">Sample Response: Uploading an Object (with a WORM Retention Policy Configured)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0080__screen738417546526"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>BF2600000164364C10805D385E1E3C67
|
|
ETag:<span class="w"> </span>"d41d8cd98f00b204e9800998ecf8427e"
|
|
x-obs-id-2:<span class="w"> </span>32AAAWJAMAABAAAQAAEAABAAAQAAEAABCTzu4Jp2lquWuXsjnLyPPiT3cfGhqPoY
|
|
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:11:15<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
</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>
|
|
|