doc-exports/docs/obs/api-ref/obs_04_0025.html
Jawei, Li f1cb839979 OBS api-ref 2.0.38.SP5
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Jawei, Li <lijiawei5@huawei.com>
Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
2022-11-03 11:54:51 +00:00

69 lines
4.8 KiB
HTML

<a name="obs_04_0025"></a><a name="obs_04_0025"></a>
<h1 class="topictitle1">Deleting Buckets</h1>
<div id="body60784478"><div class="section" id="obs_04_0025__section5584184924715"><h4 class="sectiontitle">Functions</h4><p class="msonormal" id="obs_04_0025__p42554878">This operation deletes specified buckets. This operation can be performed only by the bucket owner and users who have been authorized (via a policy) with the permission to delete the bucket. The bucket to be deleted must be an empty bucket. If a bucket has an object or a multipart task, the bucket is not empty. You can list objects and multipart upload tasks in a bucket to check whether the bucket is empty.</p>
<p class="msonormal" id="obs_04_0025__p47449588">Note:</p>
<p class="msonormal" id="obs_04_0025__p1744612505522">If the server returns a <strong id="obs_04_0025__b1251137171516">5XX</strong> error or times out when a bucket is being deleted, the system needs to synchronize the bucket information. During this period, the bucket information may be inaccurate. Therefore, wait a while and then check whether the bucket is successfully deleted. If the bucket can still be queried, send the deletion request again.</p>
</div>
<div class="section" id="obs_04_0025__section18211396"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0025__screen24595657"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4</pre></div></td><td class="code"><div class="highlight"><pre><span></span>DELETE / HTTP/1.1
Host: bucketname.obs.region.example.com
Date: date
Authorization: authorization
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0025__section29684841"><h4 class="sectiontitle">Request Parameters</h4><p class="msonormal" id="obs_04_0025__p20958252">This request contains no parameter.</p>
</div>
<div class="section" id="obs_04_0025__section65836981"><h4 class="sectiontitle">Request Headers</h4><p class="msonormal" id="obs_04_0025__p19896826">This request uses common request headers. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
</div>
<div class="section" id="obs_04_0025__section55661921"><h4 class="sectiontitle">Request Elements</h4><p class="msonormal" id="obs_04_0025__p9271588">This request involves no elements.</p>
</div>
<div class="section" id="obs_04_0025__section31195246"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0025__screen12801154"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 status_code
Date: date
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0025__section12321766"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0025__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_0025__section43787032"><h4 class="sectiontitle">Response Elements</h4><p class="msonormal" id="obs_04_0025__p1039816">This response involves no elements.</p>
</div>
<div class="section" id="obs_04_0025__section58538975"><h4 class="sectiontitle">Error Responses</h4><p class="msonormal" id="obs_04_0025__p17116244">No special error responses are involved. 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_0025__section14482163815396"><h4 class="sectiontitle">Sample Request</h4><div class="codecoloring" codetype="Xml" id="obs_04_0025__screen8484163863919"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span>DELETE / HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.example.com
Accept: */*
Date: WED, 01 Jul 2015 02:31:25 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:jZiAT8Vx4azWEvPRMWi0X5BpJMA=
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0025__section76081155815"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0025__screen8485113814"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 204 No Content
Server: OBS
x-obs-request-id: BF260000016435DE6D67C35F9B969C47
x-obs-id-2: 32AAAQAAEAABKAAQAAEAABAAAQAAEAABCTukraCnXLsb7lEw4ZKjzDWWhzXdgme3
Date: WED, 01 Jul 2015 02:31:25 GMT
</pre></div>
</td></tr></table></div>
</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>