Help Center/ Elastic Load Balance/ API Reference/ APIs (V3)/ Load Balancer/ Enabling Domain Name Resolution for IP Addresses
Updated on 2026-01-09 GMT+08:00

Enabling Domain Name Resolution for IP Addresses

Function

This API is used to enable domain name resolution for IP addresses.

Calling Method

For details, see Calling APIs.

URI

POST /v3/{project_id}/elb/loadbalancers/{loadbalancer_id}/dns/ips/batch-enable

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

Constraints: N/A

Range: The value can contain a maximum of 32 characters, including digits and lowercase letters.

Default value: N/A

loadbalancer_id

Yes

String

Specifies the load balancer ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition: Specifies the token used for IAM authentication.

Constraints: N/A

Range: N/A

Default value: N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

ips

Yes

Array of DnsIp objects

Definition: Specifies the IP addresses you want to enable domain name resolution for.

Constraints: N/A

Range: N/A

Default value: N/A

Table 4 DnsIp

Parameter

Mandatory

Type

Description

ip_address

No

String

Definition: Specifies the IP address. It can be an IPv4 or IPv6 address.

Constraints: The IP address must be a private or public IP address of the load balancer.

Range: N/A

Default value: N/A

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

ips

Array of ListDnsIpResponseBody objects

Definition: Specifies the domain name resolution information of a load balancer.

Constraints: If neither public nor private domain name resolution is enabled for the load balancer, an empty list is returned.

Range: N/A

Default value: N/A

Table 6 ListDnsIpResponseBody

Parameter

Type

Description

ips

Array of DnsIpResponse objects

Specifies the domain name resolution information of a load balancer.

Table 7 DnsIpResponse

Parameter

Type

Description

id

String

Specifies the ID of domain name resolution configured for the IP address.

enable

Boolean

Definition: Specifies whether domain name resolution is enabled for the IP address.

Range:

  • true: Domain name resolution is enabled for the IP address.

  • false: Domain name resolution is disabled for the IP address.

ip_address

String

Definition: Specifies the IP address. It can be an IPv4 or IPv6 address.

Constraints: The IP address must be a private or public IP address of the load balancer.

type

String

Definition: Specifies the IP address type.

Range:

  • vip: private IP address

  • eip: public IP address

domain_name

String

Definition: Specifies the domain name that the IP address is mapped to.

Constraints:

  • If the IP address is a private IP address, the value is a private domain name.

  • If the IP address is a public IP address, the value is a public domain name.

created_at

String

Specifies the creation time. The value must be a UTC time in the format of yyyy-MM-dd'T'HH:mm:ss'Z'.

updated_at

String

Specifies the update time. The value must be a UTC time in the format of yyyy-MM-dd'T'HH:mm:ss'Z'.

Example Requests

Enabling domain name resolution for IP addresses

POST https://{ELB_Endpoint}/v3/{project_id}/elb/loadbalancers/{loadbalancer_id}/dns/ips/batch-enable

{
  "ips" : [ {
    "ip_address" : "192.168.20.87"
  }, {
    "ip_address" : "2001:db8:a583:682::10"
  } ]
}

Example Responses

Status code: 200

Successful request.

{
  "ips" : [ {
    "enable" : true,
    "type" : "vip",
    "ip_address" : "192.168.20.87",
    "domain_name" : "10000000-0000-0000-0000-000000000001-internal.elb.zunei.test.private.com",
    "id" : "10000000-0000-0000-0000-000000000001"
  }, {
    "enable" : true,
    "type" : "eip",
    "ip_address" : "2001:db8:a583:682::10",
    "domain_name" : "10000000-0000-0000-0000-000000000001.elb.zunei.test.public.com",
    "id" : "10000000-0000-0000-0000-000000000002"
  } ]
}

Status Codes

Status Code

Description

200

Successful request.

Error Codes

See Error Codes.