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

Deleting a Record Set

Function

Delete a record set.

URI

DELETE /v2.1/zones/{zone_id}/recordsets/{recordset_id}

For details, see Table 1.
Table 1 Parameters in the URI

Parameter

Mandatory

Type

Description

zone_id

Yes

String

Zone ID. Only public zones are supported.

You can obtain the value by calling the API in Querying Public Zones.

recordset_id

Yes

String

ID of the record set to be deleted

You can obtain the value by calling the API in Querying Record Sets in a Zone.

Request

  • Request parameters

    None

  • Example request

    Delete the record set whose ID is 2c9eb155587228570158722b6ac30007 in the zone whose ID is 2c9eb155587194ec01587224c9f90149:

    DELETE https://{DNS_Endpoint}/v2.1/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587228570158722b6ac30007

Response

  • Parameter description
    Table 2 Parameters in the response

    Parameter

    Type

    Description

    id

    String

    Record set ID

    name

    String

    Record set name

    description

    String

    Record set description

    zone_id

    String

    Zone ID of the record set

    zone_name

    String

    Zone name of the record set

    type

    String

    Record set type

    The value can be A, AAAA, MX, CNAME, TXT, NS, SRV, or CAA.

    For details, see Record Set Type.

    ttl

    Integer

    Record set cache duration (in seconds) on a local DNS server. The longer the duration is, the slower the update takes effect.

    If your service address is frequently changed, set TTL to a smaller value.

    records

    Array of strings

    Record set value

    created_at

    String

    Time when the record set was created

    The UTC time format is used: YYYY-MM-DDTHH:MM:SSZ.

    updated_at

    String

    Time when the record set was updated

    The UTC time format is used: YYYY-MM-DDTHH:MM:SSZ.

    status

    String

    Resource status

    For details, see Resource Status.

    default

    Boolean

    Whether the record set is created by default. A default record set cannot be deleted.

    project_id

    String

    Project ID of the record set

    links

    Object

    Link to the current resource or other related resources. When a response is broken into pages, a next link is provided to retrieve all results. For details, see Table 3.

    line

    String

    Resolution line ID.

    weight

    Integer

    Weight of the record set

    health_check_id

    String

    Health check ID

    alias_target

    Object

    Domain name alias. For details, see Table 4.

    Table 3 Parameters in the links field

    Parameter

    Type

    Description

    self

    String

    Link to the current resource

    next

    String

    Link to the next page

    Table 4 Description of the alias_target field

    Parameter

    Type

    Description

    resource_type

    String

    Service that support domain name aliases

    The value can be cloudsite or waf (Web Application Firewall).

    resource_domain_name

    String

    Domain name of the target service

  • Example response
    {
        "id": "2c9eb155587228570158722b6ac30007",
        "name": "www.example.com.",
        "description": "This is an example record set.",
        "type": "A",
        "ttl": 300,
        "status": "PENDING_DELETE",
        "links": {
            "self": "https://Endpoint/v2.1/zones/2c9eb155587194ec01587224c9f90149/recordsets/2c9eb155587228570158722b6ac30007"
        },
        "alias_target": null,
        "zone_id": "2c9eb155587194ec01587224c9f90149",
        "zone_name": "example.com.",
        "created_at": "2016-11-17T12:03:17.827",
        "updated_at": "2016-11-17T12:56:06.439",
        "default": false,
        "project_id": "e55c6f3dc4e34c9f86353b664ae0e70c",
        "line": "default_view",
        "weight": 1,
        "health_check_id":null
    }

Returned Value

If a 2xx status code is returned, for example, 200, 202, or 204, the request is successful.

For details, see Status Code.