DELETE Bucket domain

Last updated: 2021-08-30 14:39:14

    Overview

    This API is used to delete the custom domains bound to a bucket.

    Note:

    By default, the root account has permission to delete the custom domains bound to a bucket and can go to the CAM console to grant such permission to a sub-account by allowing it to call the DeleteBucketDomain API.

    • This API deletes all custom domains bound to the bucket. To delete only some domains, call GET Bucket Domain to query all custom domains bound to the bucket first, and call PUT Bucket Domain to bind the needed domains again.

    Request

    Sample request

    DELETE /?domain HTTP/1.1
    Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
    Date: GMT Date
    Authorization: Auth String
    
    Note:

    Request parameters

    This API has no request parameter.

    Request headers

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

    Request body

    This API does not have a request body.

    Response

    Response headers

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

    Response body

    The response body of this API is empty.

    Error codes

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

    Sample

    Request

    DELETE /?domain HTTP/1.1
    Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.com
    Date: Wed, 29 Apr 2020 09:10:59 GMT
    Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1588151459;1588158659&q-key-time=1588151459;1588158659&q-header-list=date;host&q-url-param-list=domain&q-signature=813ddfaa3de3882f4b5ed2e0683e8a5f09e4****
    Connection: close
    

    Response

    HTTP/1.1 204 No Content
    Connection: close
    Date: Wed, 29 Apr 2020 09:11:00 GMT
    Server: tencent-cos
    x-cos-request-id: NWVhOTQ0YTNfYWZjOTJhMDlfMWNhYTBfOTEw****
    x-cos-trace-id: OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODczNTBmNjMwZmQ0MTZkMjg0NjlkNTYyNmY4ZTRkZTk0NzJmZTI0ZmJhYTZmZjYyNmU5ZGNlZDI5YjkyODkwYjNhZjFjMTVmYjUyNmEyY2VjMjAzMGI5NWM5ZmZlOWQyZGY=
    Content-Length: 0