Files
doc-exports/docs/sfs/api-ref/sfs_02_0112.html
lizaoxu b47ac2cabb SFS API Version
Reviewed-by: Muller, Martin <martin.muller@t-systems.com>
Co-authored-by: lizaoxu <lizaoxu@huawei.com>
Co-committed-by: lizaoxu <lizaoxu@huawei.com>
2026-01-08 08:01:31 +00:00

146 lines
14 KiB
HTML

<a name="sfs_02_0112"></a><a name="sfs_02_0112"></a>
<h1 class="topictitle1">Creating a File System</h1>
<div id="body0000001389355577"><div class="section" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_section45644251387"><h4 class="sectiontitle">Function</h4><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p456422517384">This API is used to create a file system with a specified name.</p>
<div class="note" id="sfs_02_0112__note936493816477"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="sfs_02_0112__ul175281149184611"><li id="sfs_02_0112__li1666519459384">A file system name must be unique in SFS. If a user repeatedly creates a file system with the same name as that of an existing file system in a given region, a success response is returned. In other cases, if a file system with the same name is repeatedly created, an error message will be returned, indicating that the file system already exists.</li><li id="sfs_02_0112__li144301384424">By default, a user can have a maximum of 100 file systems.</li><li id="sfs_02_0112__li04303818425">If a general purpose file system is deleted, you can create a new file system with the same name after at least 12 hours.</li></ul>
</div></div>
</div>
<div class="section" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_section25643251387"><h4 class="sectiontitle">URI</h4><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p85641256383">PUT /</p>
</div>
<div class="section" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_section15569122523811"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request header parameters</caption><thead align="left"><tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row1256922515381"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p18570025113819">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p5570202573816">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p1357014252386">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p75711025133813">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row256972512383"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p65711252389">Authorization</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p12571325143810">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p157122513816">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p19571172519388">The signature information.</p>
</td>
</tr>
<tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row256918253384"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p20571112510387">Date</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p1571172510389">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p1557262573812">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p17572112515388">The request time.</p>
</td>
</tr>
<tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row1756962518384"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p657213257381">x-obs-az-redundancy</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p157262533813">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p1457212519387">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="sfs_02_0112__p710342242010">When creating a file system, you must include this header, which sets the file system redundancy to 3AZ.</p>
<p id="sfs_02_0112__p950532013820">Example: <strong id="sfs_02_0112__b114031590541">x-obs-az-redundancy:3az</strong></p>
</td>
</tr>
<tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row1356922512382"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p12572142512385">x-obs-bucket-type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p11573182563819">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p0573202513385">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p1857313258380">The header used to specify the file system creation.</p>
<p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p195731825133810">Enumerated value:</p>
<ul id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_ul1857319253385"><li id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_li1457317253386"><strong id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_b185731525113810">SFS</strong></li></ul>
</td>
</tr>
<tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row7570162519384"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p257382523814">Host</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p1057362573811">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p657352583812">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p757492583816">The host address.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_request_CreateFileSystemConfiguration" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameter</caption><thead align="left"><tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row557492511381"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p05741325143817">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p357462514386">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p2574102514381">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p135754259384">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row14574142533813"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p1057510259384">Location</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p1157510255388">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p18575132515385">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p16575112513810">The region.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_section1957532520382"><h4 class="sectiontitle">Response Parameters</h4><p id="sfs_02_0112__p17997175315116">This response uses common headers. For details, see <a href="sfs_02_0106.html#sfs_02_0106__en-us_topic_0000001263068826_d0e686">Table 1</a>.</p>
</div>
<div class="section" id="sfs_02_0112__section034615592583"><h4 class="sectiontitle">(Optional) Response Body</h4><p id="sfs_02_0112__p133921631940">A response body contains information other than the response header. It is usually sent in a structured format (JSON or XML) defined by the response header parameter <strong id="sfs_02_0112__b3474184110244">Content-type</strong>.</p>
</div>
<div class="section" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_section45751825203817"><h4 class="sectiontitle">Example Request</h4><p id="sfs_02_0112__p1371916133458">Creating a file system in example (with the host address <strong id="sfs_02_0112__b12518124012539">Host: example-sfs-01.sfs3.example.region.com:443</strong>):</p>
<pre class="screen" id="sfs_02_0112__screen158591581338">PUT / HTTP/1.1
Host: example-sfs-01.sfs3.example.region.com:443
Date: Wed, 07 Jun 2023 02:38:09 GMT
x-obs-bucket-type: SFS
Authorization: OBS FNEX1B77SXDIB3TFMSZZ:0Xsnu4hJVOI7VWH0wIQczVN+rbg=
Content-Length: 85
x-obs-az-redundancy:3az
&lt;CreateBucketConfiguration&gt;
&lt;Location&gt;example&lt;/Location&gt;
&lt;/CreateBucketConfiguration&gt;</pre>
</div>
<div class="section" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_section1057692523814"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="sfs_02_0112__screen14291683515">HTTP/1.1 200 OK
Server: OBS
X-Obs-Request-Id: 0000018893B8058EC0470388BE6EDE88
Location: /example-sfs-01
X-Obs-Id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCTRa4voOUvr50ncznQT/hligMxL4so2z
Date: Wed, 07 Jun 2023 02:38:11 GMT
Content-Length: 0</pre>
</div>
<div class="section" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_section9576122583811"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row45761425133810"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p105761225173813">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p12576112573812">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_row757615257386"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p95761525143812">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p1057722511384">The file system is created.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_section657732518388"><h4 class="sectiontitle">Error Codes</h4><p id="sfs_02_0112__en-us_topic_0000001311071305_en-us_topic_0000001263239606_p35775252381">See <a href="sfs_02_0119.html">General Purpose File System Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="sfs_02_0111.html">File Systems</a></div>
</div>
</div>