Description
The DELETE Bucket inventory API is used to delete a specified inventory task in a bucket. You should provide the name of the inventory task to be deleted.
For detailed inventory features, see Inventory Feature Overview.
Note
- To call this API, ensure that you have the necessary permission for inventory tasks in the bucket.
- The bucket owner has this permission by default. If you do not have it, you should apply for it from the bucket owner first.
Authorization Description
In the authorization policy, action is set to cos:DeleteBucketInventory.
Request
Request Example
DELETE /?inventory&id=inventory-configuration-id HTTP/1.1
Host: <BucketName-APPID>.<Endpoint>
Date: GMT Date
Authorization: Auth String
Description
Authorization: Auth String (For details, refer to Request Signature).
Request Parameters
To call the DELETE Bucket inventory API, the inventory task name is required. The format of this parameter is as follows:
| Parameter | Description | Type | Required |
|---|---|---|---|
| id | Inventory task name. Default value: None Valid characters: a–z, A–Z, 0–9, -, _, . |
String | Yes |
Request Header
This API only uses common request headers. For details, see Common Request Headers documentation.
Request Body
The request body of this request is empty.
Response
Response Headers
This API only returns the public response header. For details, see Common Response Headers documentation.
Response Body
The response body is empty.
Error Code
This API follows unified error response and error codes. For details, please refer to the Error Codes document.
Practical Case
Request
The following example deletes the list1 task list of the examplebucket-1250000000.
DELETE /?inventory&id=list1 HTTP/1.1
Date: Mon, 28 Aug 2018 02:53:38 GMT
Authorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1503901499;1503901859&q-key-time=1503901499;1503901859&q-header-list=host&q-url-param-list=inventory&q-signature=761f3f6449c6a11684464f4b09c6f292f0a4****
Host: examplebucket-1250000000.cos.city.yfm4.fsphere.cn
Response
After receiving the request, COS returns a 204 No Content response, indicating that the inventory task list1 in the bucket is deleted.
HTTP/1.1 204 No Content
Date: Mon, 28 Aug 2018 02:53:40 GMT
x-cos-id-2:0dfafa/DAPDIFdafdsfDdfSFFfdfKKJdafasiuKJK2
x-cos-request-id: NTlhM2I3M2JfMjQ4OGY3MGFfMWE1NF84****