tencent cloud

Feedback

DELETE Bucket policy

Last updated: 2024-03-28 18:08:33

    Overview

    This API is used to delete a permission policy of a bucket.
    Note:
    Only the bucket owner can call this API. If the permission policy does not exist, "204 No Content" will be returned.
    

    Request

    Sample request

    DELETE /?policy HTTP/1.1
    Host:<BucketName-APPID>.cos.<Region>.myqcloud.com
    Date: date
    Authorization: Auth String
    Note:
    In Host: &lt;BucketName-APPID>.cos.&lt;Region>.myqcloud.com, <BucketName-APPID> is the bucket name followed by the APPID, such as examplebucket-1250000000 (see Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions), and <Region> is a COS region (see Regions and Access Endpoints).
    Authorization: Auth String (see Request Signature for more information).

    Request headers

    This API only uses common request headers. For more information, please see Common Request Headers.

    Request body

    The request body of this request is empty.

    Response

    Response headers

    This API returns only common response headers. For more information, please see Common Response Headers.

    Response body

    The response body is empty.

    Error codes

    This API returns common error responses and error codes. For more information, please see Error Codes.

    Sample

    Request

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

    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****