tencent cloud

Cloud Object Storage

DELETE Bucket policy

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-05-21 16:05:07

Feature Description

The DELETE Bucket policy API is used to delete the permission policy of a bucket.
Note:
Only the bucket owner has permission to initiate this request. If the permission policy does not exist, the system returns 204 No Content.
If multiple permission policies exist, calling this API deletes all permission policies in the bucket.


Authorization Description

In the authorization policy, set the action to cos:DeleteBucketPolicy. View all actions.

Request

Request Example

DELETE /?policy HTTP/1.1
Host:<BucketName-APPID>.cos.<Region>.myqcloud.com
Date: date
Authorization: Auth String
Note:
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com. Here, <BucketName-APPID> is the bucket name with the APPID suffix, for example, examplebucket-1250000000. For details, see the Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions documents. <Region> is the available region of COS. For details, see the Regions and Access Domains document.
Authorization: Auth String (For details, see Request Signature).

Request Header

This API only uses common request headers. For details, see Common Request Headers.

Request Body

The request body of this request is empty.

Response

Response Headers

This API only returns common response headers. For details, see Common Response Headers.

Response Body

This response body is empty.

Error Codes

This API follows unified error responses and error codes. For details, see Error Codes.

Practical Case

Request

DELETE /?policy HTTP/1.1
Host: examplebucket-1250000000.cos.ap-guangzhou.myqcloud.com
Authorization:q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1484814613;32557710613&q-key-time=1484814613;32557710613&q-header-list=host&q-url-param-list=policy&q-signature=****************************************

Response

HTTP/1.1 204 No Content
Content-Type: application/xml
Content-Length: 0
Connection: keep-alive
Date: Thu Jan 19 16:30:21 2017
Server: tencent-cos
x-cos-request-id: NTg4MDc5MWRfNDQyMDRlXzNiMDRf****

Ajuda e Suporte

Esta página foi útil?

comentários