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>
347 lines
30 KiB
HTML
347 lines
30 KiB
HTML
<a name="obs_04_0021"></a><a name="obs_04_0021"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Bucket</h1>
|
|
<div id="body39144302"><div class="section" id="obs_04_0021__section5584184924715"><h4 class="sectiontitle">Functions</h4><p class="MsoNormal" id="obs_04_0021__p35349457">This operation is used to create a bucket with a specified name.</p>
|
|
<div class="note" id="obs_04_0021__note49709663"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_04_0021__ul84544338518"><li class="NotesText" id="obs_04_0021__li84548333513">By default, a user can have a maximum of 100 buckets.</li><li id="obs_04_0021__li1522184015116">The name of a deleted bucket can be reused for a bucket or a parallel file system at least 30 minutes after the deletion.</li><li id="obs_04_0021__li1531317173514">You can enable WORM when you create a bucket, but you cannot enable WORM for an existing bucket. In a bucket with WORM enabled, you can further configure retention policies for objects you upload to this bucket. For more information, see <a href="obs_04_0167.html">Configuring a Default WORM Policy for a Bucket</a>. Once enabled, WORM cannot be disabled for a bucket. When you create a bucket with WORM enabled, OBS automatically enables versioning for the bucket and the versioning cannot be suspended for that bucket. When you create a parallel file system, you cannot enable WORM for it.</li></ul>
|
|
</div></div>
|
|
<p class="MsoNormal" id="obs_04_0021__p179081185526">A bucket name must be unique in OBS. If a user creates a bucket with the same name as that of an existing bucket under the same account and in the same region, a 200 code (indicating success) is returned. In scenarios other than the preceding one, the request for creating a bucket with the same name as that of an existing one will receive the 409 code (indicating that a namesake bucket already exists). To set an access control policy for the bucket to be created, you can add the <strong id="obs_04_0021__b9296141924716">x-obs-acl</strong> parameter to request headers.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section63129189"><h4 class="sectiontitle">Storage Class</h4><p id="obs_04_0021__p1459963215332">You can create buckets with different storage classes. The <strong id="obs_04_0021__b184051333135110">x-obs-storage-class</strong> header in a bucket creation request specifies the bucket's storage class. If you do not specify a storage class when you upload an object to the bucket, the object inherits the storage class of the bucket. The storage class options are as follows: <strong id="obs_04_0021__b1844480112017">STANDARD</strong> (Standard), <strong id="obs_04_0021__b544416082018">WARM</strong> (Warm), <strong id="obs_04_0021__b444480192010">COLD</strong> (Cold). If the <strong id="obs_04_0021__b1819518563534">x-obs-storage-class</strong> header is not in the request, a Standard bucket will be created.</p>
|
|
<p class="MsoNormal" id="obs_04_0021__p148955">If the storage class of an object is not specified when it is uploaded to a bucket (see <a href="obs_04_0080.html">Uploading an Object - PUT</a>), the object will be stored in the default storage class of the bucket.</p>
|
|
<ul id="obs_04_0021__ul12065374"><li id="obs_04_0021__li41479503">OBS Standard features low access latency and high throughput. It is most suitable for storing frequently accessed (multiple times per month) hot files. Potential application scenarios include big data, mobile applications, trending videos, and social media images.</li><li id="obs_04_0021__li13303135113346">OBS Warm storage class is suitable for storing data that is infrequently accessed (less than 12 times a year) yet has quick response requirements. Potential application scenarios include file synchronization or sharing and enterprise backup. It provides the same durability, access latency, and throughput as the Standard storage class but at a lower price. However, the Warm storage class has lower availability than the Standard one.</li><li id="obs_04_0021__li16303751123411">OBS Cold storage class is applicable to archiving rarely-accessed (averagely once a year) data. The application scenarios include data archiving and long-term data retention for backup. The Cold storage class is secure, durable, and inexpensive, which can replace tape libraries. To keep cost low, it may take hours to restore data from the Cold storage class.</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section31291796"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0021__screen20577521"><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></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/<span class="w"> </span>HTTP/1.1<span class="w"> </span>
|
|
Host:<span class="w"> </span>bucketname.obs.region.example.com
|
|
Content-Length:<span class="w"> </span>length
|
|
Date:<span class="w"> </span>date
|
|
Authorization:<span class="w"> </span>authorization
|
|
<span class="w"> </span>
|
|
<span class="nt"><CreateBucketConfiguration</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="w"> </span><span class="nt"><Location></span>location<span class="nt"></Location></span><span class="w"> </span>
|
|
<span class="nt"></CreateBucketConfiguration></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section13190716"><h4 class="sectiontitle">Request Parameters</h4><p class="MsoNormal" id="obs_04_0021__p31433398">This request contains no parameters.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section51607580"><h4 class="sectiontitle">Request Headers</h4><p class="MsoNormal" id="obs_04_0021__p63077327">The operation message header is the same as that of a common request. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>. However, this request can contain additional headers. The following table describes the additional headers for this request.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0021__table57087753" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Additional request headers</caption><thead align="left"><tr id="obs_04_0021__row63312464"><th align="left" class="cellrowborder" valign="top" width="24.490000000000002%" id="mcps1.3.5.3.2.4.1.1"><p id="obs_04_0021__p28035972"><strong id="obs_04_0021__b085473515416">Header</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="59.18%" id="mcps1.3.5.3.2.4.1.2"><p id="obs_04_0021__p37128967"><strong id="obs_04_0021__b073433313419">Description</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.33%" id="mcps1.3.5.3.2.4.1.3"><p id="obs_04_0021__p22145185"><strong id="obs_04_0021__b8244122234213">Mandatory</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0021__row37712700"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p34829825">x-obs-acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p66931621152511">When creating a bucket, you can add this header to set the permission control policy for the bucket. The predefined common policies are as follows: <strong id="obs_04_0021__b6282197741664">private</strong>, <strong id="obs_04_0021__b13627373241664">public-read</strong>, <strong id="obs_04_0021__b18330478381664">public-read-write</strong>, <strong id="obs_04_0021__b3928975471664">public-read-delivered</strong>, and <strong id="obs_04_0021__b666696071664">public-read-write-delivered</strong>.</p>
|
|
<p id="obs_04_0021__p12801353">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p30276635">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row4054265"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p59960025">x-obs-storage-class</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p1638234817364">When creating a bucket, you can add this header to specify the default storage class for the bucket. The storage class options are as follows: <strong id="obs_04_0021__b1623715299173">STANDARD</strong> (Standard), <strong id="obs_04_0021__b7872123211712">WARM</strong> (Warm), and <strong id="obs_04_0021__b1975633691711">COLD</strong> (Cold). If this header is not in the request, a Standard bucket will be created.</p>
|
|
<p id="obs_04_0021__p22988206">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p50105411">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row48295517"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p19622832">x-obs-grant-read</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p1421505373813">This header grants the read permission to all users under an account. It allows you to list objects in a bucket, list multipart tasks in a bucket, list multi-version objects in a bucket, and obtain bucket metadata.</p>
|
|
<p id="obs_04_0021__p10856668">Type: string</p>
|
|
<p id="obs_04_0021__p30601150">Example: <strong id="obs_04_0021__b985615415347">x-obs-grant-read:id=</strong><em id="obs_04_0021__i1613315510341">Tenant ID</em></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p62774090">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row28095902"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p61175557">x-obs-grant-write</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p12844193894010">This header grants the write permission to all users under an account. Therefore, the users can create, delete, and overwrite all objects in a bucket, and can initialize parts, upload parts, copy parts, merge parts, and cancel multipart upload tasks.</p>
|
|
<p id="obs_04_0021__p36695905">Type: string</p>
|
|
<p id="obs_04_0021__p61827690">Example: <strong id="obs_04_0021__b167392143415">x-obs-grant-write:id=</strong><em id="obs_04_0021__i103908216345">Tenant ID</em></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p41986999">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row42338677"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p6880812">x-obs-grant-read-acp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p20474891">This header grants the ACL read permission to all users under an account. Therefore, the users can read the bucket ACL information.</p>
|
|
<p id="obs_04_0021__p50056298">Type: string</p>
|
|
<p id="obs_04_0021__p47853499">Example: <strong id="obs_04_0021__b1785335673414">x-obs-grant-read-acp:id=</strong><em id="obs_04_0021__i9681658133420">Account ID</em></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p50928228">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row55700869"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p15476501">x-obs-grant-write-acp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p45637041">This header grants the ACL write permission to all users under an account. Therefore, the users can modify the ACL of the bucket.</p>
|
|
<p id="obs_04_0021__p8080192">Type: string</p>
|
|
<p id="obs_04_0021__p5612866">Example: <strong id="obs_04_0021__b11210113117350">x-obs-grant-write-acp:id=</strong><em id="obs_04_0021__i1231943243514">Account ID</em></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p51989040">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row65248181"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p50611321">x-obs-grant-full-control</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p5876300">This header grants the full control permission to all users under an account.</p>
|
|
<p id="obs_04_0021__p52886708">Type: string</p>
|
|
<p id="obs_04_0021__p6218329">Example: <strong id="obs_04_0021__b19783144653510">x-obs-grant-full-control:id=</strong><em id="obs_04_0021__i6767947203517">Account ID</em></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p33922630">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row34911922194719"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p20492622154714">x-obs-grant-read-delivered</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p204925228471">This header grants the read permission to all users under an account. By default, the read permission is applied to all objects in the bucket.</p>
|
|
<p id="obs_04_0021__p1843514256448">Type: string</p>
|
|
<p id="obs_04_0021__p64401625164420">Example: <strong id="obs_04_0021__b265817549358">x-obs-grant-read-delivered:id=</strong><em id="obs_04_0021__i1268045593511">Account ID</em></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p1749314221476">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row13105125144713"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p5106142514476">x-obs-grant-full-control-delivered</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p310642510478">This header grants the full control permission to all users under an account. By default, the FULL_CONTROL permission is applied to all objects in the bucket.</p>
|
|
<p id="obs_04_0021__p112671441124413">Type: string</p>
|
|
<p id="obs_04_0021__p227016412442">Example: <strong id="obs_04_0021__b101851226367">x-obs-grant-full-control-delivered:id=</strong><em id="obs_04_0021__i101801536360">Account ID</em></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p4106182511475">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row135911330135420"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p105921330155411">x-obs-fs-file-interface</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p323141925514">This header can be carried when you create a bucket as a parallel file system.</p>
|
|
<p id="obs_04_0021__p1059283015411">Type: string</p>
|
|
<p id="obs_04_0021__p1878174975410">Example: <strong id="obs_04_0021__b84235270620462">x-obs-fs-file-interface:Enabled</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p6592030205411">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0021__row12832122914614"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0021__p04291941114615">x-obs-bucket-object-lock-enabled</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.18%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0021__p1883212934612">When creating a bucket, you can use this header to enable WORM for the bucket.</p>
|
|
<p id="obs_04_0021__p136881949174813">Type: string</p>
|
|
<p id="obs_04_0021__p373012503474">Example: <strong id="obs_04_0021__b02545418234">x-obs-bucket-object-lock-enabled:true</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.33%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0021__p16832229194616">No</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section61815038"><h4 class="sectiontitle">Request Elements</h4><p class="MsoNormal" id="obs_04_0021__p63378491">This request can use additional elements. For details about additional elements, see <a href="#obs_04_0021__table19762527">Table 2</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0021__table19762527"></a><a name="table19762527"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0021__table19762527" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Additional request elements</caption><thead align="left"><tr id="obs_04_0021__row13310718"><th align="left" class="cellrowborder" valign="top" width="31.630000000000003%" id="mcps1.3.6.3.2.4.1.1"><p id="obs_04_0021__p4426350"><strong id="obs_04_0021__b1868435794413">Element</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="38.78%" id="mcps1.3.6.3.2.4.1.2"><p id="obs_04_0021__p5584123"><strong id="obs_04_0021__b15780125912446">Description</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="29.59%" id="mcps1.3.6.3.2.4.1.3"><p id="obs_04_0021__p44294306"><strong id="obs_04_0021__b123609424510">Mandatory</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0021__row11186095"><td class="cellrowborder" valign="top" width="31.630000000000003%" headers="mcps1.3.6.3.2.4.1.1 "><p id="obs_04_0021__p33658473">Location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="38.78%" headers="mcps1.3.6.3.2.4.1.2 "><p id="obs_04_0021__p41981775">Specifies the region where a bucket will be created.</p>
|
|
|
|
<ul id="obs_04_0021__ul108049270509"><li id="obs_04_0021__li1804327125016">When creating a bucket using the endpoint of the default region, note the following:<ul id="obs_04_0021__ul118042279508"><li id="obs_04_0021__li0804142745020">If <strong id="obs_04_0021__b14441173823819">Location</strong> is not specified, the bucket is created in the default region.</li><li id="obs_04_0021__li12804227115019">If Location is specified to other region, the bucket is created in the specified region.</li></ul>
|
|
</li><li id="obs_04_0021__li14804172755010">When creating a bucket using the endpoint of a non-default region, <strong id="obs_04_0021__b1913343253915">Location</strong> must be specified to the region corresponding to the endpoint.</li></ul>
|
|
<p id="obs_04_0021__p2995732114012">For details about OBS regions and endpoints, see <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
|
|
<p id="obs_04_0021__p3072675">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.59%" headers="mcps1.3.6.3.2.4.1.3 "><p id="obs_04_0021__p47560152">No</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section19464436"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0021__screen27167126"><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></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
|
|
Location:<span class="w"> </span>location
|
|
Date:<span class="w"> </span>date
|
|
Content-Length:<span class="w"> </span>length
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section40962197"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0021__p1512332591013">The response to the request uses common headers. For details, see <a href="obs_04_0013.html#obs_04_0013__d0e686">Table 1</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section33115460"><h4 class="sectiontitle">Response Elements</h4><p class="MsoNormal" id="obs_04_0021__p31505145">This response contains no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section29603689"><h4 class="sectiontitle">Error Responses</h4><p class="MsoNormal" id="obs_04_0021__p1779922">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_0021__section4967514913"><h4 class="sectiontitle">Sample Request: Creating a Bucket</h4><div class="codecoloring" codetype="Xml" id="obs_04_0021__screen26315321216"><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>/<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>02:25:05<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:75/Y4Ng1izvzc1nTGxpMXTE6ynw=
|
|
Content-Length:<span class="w"> </span>157
|
|
|
|
<span class="nt"><CreateBucketConfiguration</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="w"> </span><span class="nt"><Location></span>region<span class="nt"></Location></span>
|
|
<span class="nt"></CreateBucketConfiguration></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section61601145011"><h4 class="sectiontitle">Sample Response: Creating a Bucket</h4><div class="codecoloring" codetype="Xml" id="obs_04_0021__screen1263818017211"><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>BF260000016435CE298386946AE4C482
|
|
Location:<span class="w"> </span>/examplebucket
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABSAAgAAEAABAAAQAAEAABCT9W2tcvLmMJ+plfdopaD62S0npbaRUz
|
|
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>02:25:06<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_0021__section535111413214"><h4 class="sectiontitle">Sample Request: Creating a Bucket (with the ACL and Storage Class Specified)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0021__screen12744828924"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span>
|
|
<span class="normal">13</span></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/<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>02:25:05<span class="w"> </span>GMT
|
|
x-obs-acl:public-read
|
|
x-obs-storage-class:STANDARD
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:75/Y4Ng1izvzc1nTGxpMXTE6ynw=
|
|
Content-Length:<span class="w"> </span>157
|
|
|
|
<span class="nt"><CreateBucketConfiguration</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="w"> </span><span class="nt"><Location></span>region<span class="nt"></Location></span><span class="w"> </span>
|
|
<span class="nt"></CreateBucketConfiguration></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section01968196583"><h4 class="sectiontitle">Sample Response: Creating a Bucket (with the ACL and Storage Class Specified)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0021__screen181998192587"><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>BF260000016435CE298386946AE4C482
|
|
Location:<span class="w"> </span>/examplebucket
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABSAAgAAEAABAAAQAAEAABCT9W2tcvLmMJ+plfdopaD62S0npbaRUz
|
|
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>02:25:06<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_0021__section4293341135610"><a name="obs_04_0021__section4293341135610"></a><a name="section4293341135610"></a><h4 class="sectiontitle">Sample Request: Creating a Parallel File System</h4><div class="codecoloring" codetype="Xml" id="obs_04_0021__screen152931411562"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span></pre></div></td><td class="code"><div><pre><span></span>PUT<span class="w"> </span>/<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>02:25:05<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:75/Y4Ng1izvzc1nTGxpMXTE6ynw=
|
|
Content-Length:<span class="w"> </span>157
|
|
x-obs-fs-file-interface:<span class="w"> </span>Enabled
|
|
|
|
<span class="nt"><CreateBucketConfiguration</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="nt"><Location></span>region<span class="nt"></Location></span><span class="w"> </span>
|
|
<span class="nt"></CreateBucketConfiguration></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section8294241145618"><h4 class="sectiontitle">Sample Response: Creating a Parallel File System</h4><div class="codecoloring" codetype="Xml" id="obs_04_0021__screen32947410563"><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>BF260000016435CE298386946AE4C482
|
|
Location:<span class="w"> </span>/examplebucket
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABSAAgAAEAABAAAQAAEAABCT9W2tcvLmMJ+plfdopaD62S0npbaRUz
|
|
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>02:25:06<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_0021__section62827378569"><h4 class="sectiontitle">Sample Request: Creating a Bucket with WORM Enabled</h4><pre class="screen" id="obs_04_0021__screen9331457195713">PUT / HTTP/1.1
|
|
User-Agent: curl/7.29.0
|
|
Host: examplebucket.obs.region.example.com
|
|
Accept: */*
|
|
Date: WED, 01 Jul 2015 02:25:05 GMT
|
|
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:75/Y4Ng1izvzc1nTGxpMXTE6ynw=
|
|
x-obs-bucket-object-lock-enabled:true
|
|
Content-Length: 0</pre>
|
|
</div>
|
|
<div class="section" id="obs_04_0021__section21791905571"><h4 class="sectiontitle">Sample Response: Creating a Bucket with WORM Enabled</h4><pre class="screen" id="obs_04_0021__screen3134132318214">HTTP/1.1 200 OK
|
|
Server: OBS
|
|
x-obs-request-id: 00000184C11AC7A6809F881341842C02
|
|
x-reserved-indicator: Unauthorized
|
|
Location: /examplebucket
|
|
x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCT9W2tcvLmMJ+plfdopaD62S0npbaRUz
|
|
Date: WED, 01 Jul 2015 02:25:06 GMT
|
|
Content-Length: 0</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0019.html">Operations on Buckets</a></div>
|
|
</div>
|
|
</div>
|
|
|