Updated on 2024-03-25 GMT+08:00

Deleting a Public Zone

Function

This API is used to delete a public zone.

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/zones/{zone_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

zone_id

Yes

String

ID of the zone to be deleted

Minimum: 32

Maximum: 36

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

Zone ID

name

String

Zone name

description

String

Zone description

email

String

Mailbox of the administrator managing the zone

zone_type

String

Zone type. The value is public.

ttl

Integer

TTL value of the SOA record set in the zone

serial

Integer

Sequence number used to identify zone file changes in the SOA record set of the zone. The sequence number is used for synchronization between the master and slave nodes.

status

String

Resource Status

record_num

Integer

Number of record sets in a zone

pool_id

String

Pool that hosts the zone. The pool is assigned by the system.

project_id

String

Project ID of the zone

created_at

String

Time when the zone was created

updated_at

String

Time when the zone was updated

masters

Array of strings

Master DNS servers, from which the slave servers get DNS information

links

pageLink object

Link of the current resource or other related resources. When the query needs to be displayed on multiple pages, a next link must be included to point to the next page.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

code

String

Error code

Minimum: 8

Maximum: 36

message

String

Description

Minimum: 2

Maximum: 512

Status code: 404

Table 6 Response body parameters

Parameter

Type

Description

code

String

Error code

Minimum: 8

Maximum: 36

message

String

Description

Minimum: 2

Maximum: 512

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

code

String

Error code

Minimum: 8

Maximum: 36

message

String

Description

Minimum: 2

Maximum: 512

Example Requests

None

Example Responses

Status code: 200

Response to the request for deleting a public zone

{
  "id" : "2c9eb155587194ec01587224c9f90149",
  "name" : "example.com.",
  "description" : "This is an example zone.",
  "email" : "xx@example.com",
  "ttl" : 300,
  "serial" : 1,
  "masters" : [ ],
  "status" : "PENDING_DELETE",
  "links" : {
    "self" : "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149"
  },
  "pool_id" : "00000000570e54ee01570e9939b20019",
  "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c",
  "zone_type" : "public",
  "created_at" : "2016-11-17T11:56:03.439",
  "updated_at" : "2016-11-17T11:56:05.057",
  "record_num" : 0
}

Status Codes

Status Code

Description

200

Response to the request for deleting a public zone

400

Error response

404

The resource does not exist.

500

Error response

Error Codes

See Error Codes.