• Domain Name Service

dns
  1. Help Center
  2. Domain Name Service
  3. API Reference
  4. API Description
  5. PTR Record Management
  6. Configuring a PTR Record

Configuring a PTR Record

Function

Configure the PTR record for an elastic IP address (EIP).

URI

PATCH /v2/reverse/floatingips/{region}:{floatingip_id}

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

Parameter

Mandatory

Type

Description

region

Yes

string

Region of the tenant

floatingip_id

Yes

string

EIP ID

Request

  • Parameter description
    Table 2 Parameters in the request

    Parameter

    Mandatory

    Type

    Description

    ptrdname

    Yes

    string

    Domain name of the PTR record

    A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.

    description

    No

    string

    PTR record description

    ttl

    No

    int

    Caching period of a PTR record (in seconds)

    The default value is 300s.

    The value range is 300–2147483647.

    tags

    No

    List<tag>

    Resource tag.

    Table 3 Description of the tag list

    Parameter

    Mandatory

    Type

    Description

    key

    Yes

    string

    Tag key. The key contains 36 Unicode characters at most and cannot be blank. It can contain only digits, letters, hyphens (-), and underscores (_).

    value

    Yes

    string

    Tag value. Each value contains 43 Unicode characters at most and can be an empty string. It can contain only digits, letters, hyphens (-), and underscores (_).

  • Example request
    {
        "ptrdname": "www.example.com",
        "description": "Description for this PTR record",
        "ttl": 300
    }

Response

  • Parameter description
    Table 4 Parameters in the response

    Parameter

    Type

    Description

    id

    string

    PTR record ID, which is in {region}:{floatingip_id} format

    ptrdname

    string

    Domain name of the PTR record

    description

    string

    PTR record description

    ttl

    int

    Caching period of a PTR record (in seconds)

    The default value is 300s.

    The value range is 300–2147483647.

    address

    string

    EIP

    status

    enum

    Resource status

    The value can be PENDING_CREATE, ACTIVE, PENDING_DELETE, PENDING_UPDATE, or ERROR.

    action

    enum

    Requested operation on the resource

    The value can be CREATE, UPDATE, or DELETE.

    links

    object

    Link of the current resource or other related resources

    When a response is broken into pages, a next link is provided to retrieve all results.

  • Example response
    {
        "id": "region_id:c5504932-bf23-4171-b655-b87a6bc59334",
        "ptrdname": "www.example.com.",
        "description": "Description for this PTR record",
        "address": "10.154.52.138",
        "action": "CREATE",
        "ttl": 300,
        "status": "PENDING_CREATE",
        "links": {
            "self": "https://Endpoint/v2/reverse/floatingips/region_id:c5504932-bf23-4171-b655-b87a6bc59334"
        }
    }

Returned Value

See General Request Return Code.