doc-exports/docs/obs/api-swift/obs_03_0036.html
zhangyue 894279c39a Object Storage Service API Reference Swift V1
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2023-02-02 08:50:48 +00:00

36 lines
2.4 KiB
HTML

<a name="obs_03_0036"></a><a name="obs_03_0036"></a>
<h1 class="topictitle1">Examples</h1>
<div id="body1442461140561"><div class="section" id="obs_03_0036__section2201390"><h4 class="sectiontitle">Create Container</h4><p id="obs_03_0036__p61892272161737">Create a container named <strong id="obs_03_0036__b27369819">marktwain</strong>:</p>
</div>
<pre class="codeblock" id="obs_03_0036__codeblock44595006102738">curl -i -H "X-Auth-token:caf12eeaae6b45b1afcb7ad1d6588a4f" "http://172.28.5.30:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9/marktwain" -X PUT</pre>
<pre class="screen" id="obs_03_0036__screen4496161">HTTP/1.1 201 Created
X-Trans-Id: tx568a5d33add18d5f73757-b6dc185e91
Content-Type: text/html;charset=UTF-8
Date: Fri, 18 Sep 2015 01:58:51 GMT
Content-Length: 0</pre>
<div class="section" id="obs_03_0036__section60098234144536"><h4 class="sectiontitle">Create Existing Container</h4><p id="obs_03_0036__p48068385162043">Container <strong id="obs_03_0036__b42932445">marktwain</strong> exists. Create it again.</p>
<pre class="codeblock" id="obs_03_0036__codeblock6275172102819">curl -i -H "X-Auth-token:caf12eeaae6b45b1afcb7ad1d6588a4f" "http://172.28.5.30:80/v1/AUTH_0ce042a9be6140769b12c1001d41bcf9/marktwain" -X PUT</pre>
</div>
<pre class="screen" id="obs_03_0036__screen46317933145020">HTTP/1.1 202 Accepted
X-Trans-Id: txed4fe8ffb3219cd0db230-cbe125775d
Content-Type: text/html;charset=UTF-8
Date: Fri, 18 Sep 2015 01:59:01 GMT
Content-Length: 76
&lt;html&gt;&lt;h1&gt;Accepted&lt;/h1&gt;&lt;p&gt;The request is accepted for processing.&lt;/p&gt;&lt;/html&gt;</pre>
<div class="section" id="obs_03_0036__section55269209103042"><h4 class="sectiontitle">Create Container (with a Read ACL Specified)</h4><p id="obs_03_0036__p47919921103128">Create a container and specify the <strong id="obs_03_0036__b34248408">X-Container-Read</strong> metadata.</p>
<pre class="codeblock" id="obs_03_0036__codeblock18835946173715">curl -i http://172.28.54.10:80/v1/AUTH_4b34aa268d8c45879cf4da16443d3f95/ruanman -H"x-auth-token:c1f21a34cce442efbd4957018263cc2c" -H"x-container-read:.r:*" -X PUT</pre>
<pre class="screen" id="obs_03_0036__screen28157710103234">HTTP/1.1 201 Created
X-Trans-Id: tx000001513752eba4370a5-4f8cd5e885
Content-Length: 0
Content-Type: text/html;charset=UTF-8
Date: Tue, 24 Nov 2015 02:29:24 GMT</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0033.html">Create Container</a></div>
</div>
</div>