forked from docs/doc-exports
OBS Util 0115 Version
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
This commit is contained in:
94
docs/obs/tool-obsutil/obs_11_0008.html
Normal file
94
docs/obs/tool-obsutil/obs_11_0008.html
Normal file
@ -0,0 +1,94 @@
|
||||
<a name="obs_11_0008"></a><a name="obs_11_0008"></a>
|
||||
|
||||
<h1 class="topictitle1">Creating a Bucket</h1>
|
||||
<div id="body1542440101580"><div class="section" id="obs_11_0008__section1479112110815"><h4 class="sectiontitle">Function</h4><p id="obs_11_0008__p11772825481">You can use this command to create a bucket. A bucket name must be unique in OBS. One account can create a maximum of 100 buckets.</p>
|
||||
<div class="note" id="obs_11_0008__note722632711349"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_11_0008__p766115412477">If you create a bucket and name it the same as an existing one in the same account and region, no error will be reported and status code 200 is returned. The bucket properties comply with those set in the first creation request. In other cases, creating a bucket with the same name as an existing one will receive the status code 409, indicating that the bucket already exists.</p>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="section" id="obs_11_0008__section1220752192216"><h4 class="sectiontitle">Command Line Structures</h4><ul id="obs_11_0008__ul832417119303"><li id="obs_11_0008__li19324181113010">Windows<pre class="screen" id="obs_11_0008__screen69741218113010">obsutil mb obs://bucket [-fs] [-acl=xxx] [-sc=xxx] [-location=xxx] [-config=xxx] </pre>
|
||||
</li><li id="obs_11_0008__li1476086143015">macOS or Linux<pre class="screen" id="obs_11_0008__screen82451326103012">./obsutil mb obs://bucket [-fs] [-acl=xxx] [-sc=xxx] [-location=xxx] [-config=xxx] </pre>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="obs_11_0008__section1922135817426"><h4 class="sectiontitle">Examples</h4><ul id="obs_11_0008__ul11221105812429"><li id="obs_11_0008__li12211358154213">In Windows, run <strong id="obs_11_0008__b129741610194715">obsutil mb obs://bucket-test</strong> to create a bucket. The creation succeeds.<pre class="screen" id="obs_11_0008__screen9221195824210"><strong id="obs_11_0008__b222165810424">obsutil mb obs://bucket-test</strong>
|
||||
Start at 2024-09-29 07:52:11.3769487 +0000 UTC
|
||||
|
||||
Create bucket [bucket-test] successfully, request id [000001923CC401864018BA75753D2D5F]
|
||||
</pre>
|
||||
</li></ul>
|
||||
<ul id="obs_11_0008__ul17222155814420"><li id="obs_11_0008__li2222135818421">In Windows, run <strong id="obs_11_0008__b1831485734714">obsutil mb obs://bucket001</strong> to create a bucket with the same name as a bucket owned by another account. The creation fails.<pre class="screen" id="obs_11_0008__screen0222115810426"><strong id="obs_11_0008__b13222358164215">obsutil mb obs://bucket001</strong>
|
||||
Start at 2024-09-30 07:03:50.1378331 +0000 UTC
|
||||
|
||||
Create bucket [bucket001] failed, status [409], error code [BucketAlreadyExists], error message [The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.], request id [0000019241BE18DB4019EDD66E135C56]</pre>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="obs_11_0008__section6559191102418"><h4 class="sectiontitle">Parameter Description</h4>
|
||||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0008__table10831182114445" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0008__row683212154419"><th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.4.2.1.4.1.1"><p id="obs_11_0008__p118329219446">Parameter</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.4.2.1.4.1.2"><p id="obs_11_0008__p15137125919108">Optional or Mandatory</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="65%" id="mcps1.3.4.2.1.4.1.3"><p id="obs_11_0008__p12832121184414">Description</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="obs_11_0008__row108328217449"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0008__p64495172515">bucket</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0008__p154316502519">Mandatory</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0008__p17425512259">The bucket name</p>
|
||||
<div class="p" id="obs_11_0008__p1748811361418">A bucket name:<ul id="obs_11_0008__ul1748816130141"><li id="obs_11_0008__li2488101341418">Must be 3 to 63 characters long and start with a digit or letter. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed.</li><li id="obs_11_0008__li448821313144">Cannot be formatted as an IP address.</li><li id="obs_11_0008__li194885136143">Cannot start or end with a hyphen (-) or period (.).</li><li id="obs_11_0008__li0488191351418">Cannot contain two consecutive periods (.), for example, <strong id="obs_11_0008__b842352706191036">my..bucket</strong>.</li><li id="obs_11_0008__li194884137146">Cannot contain a period (.) and a hyphen (-) adjacent to each other, for example, <strong id="obs_11_0008__b53955432910">my-.bucket</strong> or <strong id="obs_11_0008__b139454102920">my.-bucket</strong>.</li></ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_11_0008__row1965719371463"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0008__p1765810371962">fs</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0008__p262154512618">Optional (additional parameter)</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0008__p1765812372061">Creates a parallel file system.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_11_0008__row19509222417"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0008__p159501222414">acl</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0008__p4950172216419">Optional (additional parameter)</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0008__p538785162317">The access control policy that can be specified when creating a bucket</p>
|
||||
<p id="obs_11_0008__p16811512123619">The value can be:</p>
|
||||
<ul id="obs_11_0008__ul1273864144412"><li id="obs_11_0008__li17738649445"><strong id="obs_11_0008__b1653141954610">private</strong>: Only users granted permissions by the bucket ACL can access the bucket.</li><li id="obs_11_0008__li1551213137447"><strong id="obs_11_0008__b201358282509">public-read</strong>: Anyone can read objects in the bucket.</li><li id="obs_11_0008__li1287691813449"><strong id="obs_11_0008__b798925420505">public-read-write</strong>: Anyone can read, write, or delete objects in the bucket.</li></ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_11_0008__row8533319194211"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0008__p19533119154211">sc</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0008__p4533191944218">Optional (additional parameter)</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0008__p7476142451913">The storage class of the bucket</p>
|
||||
<p id="obs_11_0008__p17381132810197">Different storage classes meet customers' needs for storage performance and costs.</p>
|
||||
<p id="obs_11_0008__p86547153813">The value can be:</p>
|
||||
<ul id="obs_11_0008__ul175651814214"><li id="obs_11_0008__li1256512172114"><strong id="obs_11_0008__b5806518121118">standard</strong>: Standard storage class. It features low access latency and high throughput, and is applicable to storing frequently accessed data (multiple accesses per month) or data that is smaller than 1 MB.</li><li id="obs_11_0008__li10565181142113"><strong id="obs_11_0008__b16412411234">warm</strong>: Warm storage class. It is ideal for storing infrequently accessed (less than 12 times a year) data, but when needed, the access has to be fast.</li><li id="obs_11_0008__li756616110216"><strong id="obs_11_0008__b42301244122318">cold</strong>: Cold storage class. It provides secure, durable, and inexpensive storage for rarely-accessed (once a year) data.</li></ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_11_0008__row116471725174219"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0008__p16475251428">location</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0008__p62572833155512">Mandatory unless the requested OBS region is the default one (additional parameter)</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0008__p5359820175320">The region where the bucket resides</p>
|
||||
<p id="obs_11_0008__p18031111102213"></p>
|
||||
<ul id="obs_11_0008__ul1316912157296"><li id="obs_11_0008__li19336162042916"><strong id="obs_11_0008__b42441216183512">Once the bucket is created, its region cannot be changed.</strong></li><li id="obs_11_0008__li16169315112920">For lower latency and faster access, select the region nearest to where the data will be accessed.</li></ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_11_0008__row03949318313"><td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0008__p153951131317">config</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0008__p12395135316">Optional (additional parameter)</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0008__p1750111452317">The user-defined configuration file for executing the current command. For details about parameters that can be configured, see <a href="obs_11_0035.html">Configuration Parameters</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_11_0007.html">Bucket Commands</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user