Deletes the CNAME record that is mapped to a bucket.
Request syntax
POST /?cname&comp=delete HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Content-Type: application/xml
Content-Length: 186
Date: GMT Date
Authorization: SignatureValue
Request headers
The request headers involved in this API operation include only common request headers. For more information, see Common request headers.
Request elements
Element | Type | Required | Example | Description |
BucketCnameConfiguration | Container | Yes | N/A | The container that stores the CNAME record. Parent nodes: none Child nodes: Cname |
Cname | Container | Yes | N/A | The container in which the CNAME information is stored. Parent nodes: BucketCnameConfiguration Child nodes: Domain |
Domain | String | Yes | example.com | The custom domain name. Parent nodes: Cname Child nodes: none |
Response headers
This request contains only common response headers. For more information, see Common HTTP headers.
Examples
Sample request
POST /?cname&comp=delete HTTP/1.1 Host: oss-example.oss-cn-hangzhou.aliyuncs.com Content-Type: application/xml Content-Length: 186 Date: Thu, 24 Sep 2015 15:39:12 GMT Authorization: OSS qn6q**************:77Dv**************** <BucketCnameConfiguration> <Cname> <Domain>example.com</Domain> </Cname> </BucketCnameConfiguration>
Sample response
HTTP/1.1 200 OK x-oss-request-id: 5C1B138A109F4E405B2D Date: Mon, 26 Jul 2021 13:08:38 GMT Content-Length: 118 Content-Type: application/xml Connection: keep-alive Server: AliyunOSS
Error codes
Error code | HTTP status code | Description |
AccessDenied | 403 | The error message returned because you do not have the permissions to call the DeleteCname operation. Only the bucket owner and RAM users that are granted the |
NoSuchCname | 404 | The error message returned because no CNAME record is mapped to the bucket. |