Configuring System-defined Domain Name Resolution for a Load Balancer
Function
This API is used to configure system-defined domain name resolution for a load balancer.
Calling Method
For details, see Calling APIs.
URI
POST /v3/{project_id}/elb/loadbalancers/{loadbalancer_id}/dns/system-default-config
|
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
|
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 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
loadbalancer |
Yes |
Definition: Specifies the request parameters for configuring system-defined domain name resolution for a load balancer. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
public_dns_record_set_ttl |
No |
Integer |
Definition: Specifies the cache duration of the public record set on a local DNS server. The longer the duration is, the slower the update takes effect. If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value. Constraints: N/A Range: 1 to 2147483647 Default value: 300 |
|
private_domain_name_enable |
No |
Boolean |
Definition: Specifies whether to enable private domain name resolution. Constraints: N/A Range:
Default value: false |
|
public_domain_name_enable |
No |
Boolean |
Definition: Specifies whether to enable public domain name resolution. Constraints: N/A Range:
Default value: false |
|
private_dns_record_set_ttl |
No |
Integer |
Definition: Specifies the cache duration of the private record set on a local DNS server. The longer the duration is, the slower the update takes effect. If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value. Constraints: N/A Range: 1 to 2147483647 Default value: 300 |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
loadbalancer |
DnsConfigResponseBody object |
Definition: Specifies the response parameters for configuring domain name resolution for a load balancer. |
|
Parameter |
Type |
Description |
|---|---|---|
|
vip_address |
String |
Definition: Specifies the virtual IPv4 address of the load balancer. |
|
ipv6_vip_address |
String |
Definition: Specifies the IPv6 address of the load balancer. Constraints: |
|
eips |
Array of EipInfo objects |
Definition: Specifies the EIPs bound to the load balancer.
NOTE:
This parameter has the same meaning as publicips.
|
|
global_eips |
Array of GlobalEipInfo objects |
Definition: Specifies the global EIPs bound to the load balancer. |
|
public_domain_name_enable |
Boolean |
Definition: Specifies whether to enable public domain name resolution. Range:
|
|
public_dns_zone_name |
String |
Definition: Specifies the public zone that will be used to generate public domain names for the load balancer. Constraints:
|
|
public_dns_zone_id |
String |
Definition: Specifies the ID of the public zone. The ID can be obtained based on the public zone name. |
|
public_domain_name |
String |
Definition: Specifies the public domain names of the load balancer. Constraints: The public domain names are generated in the following format: {lb_id}.elb.{region_id}.{zone_name} |
|
public_dns_record_set_ttl |
Integer |
Definition: Specifies the cache duration of the public record set on a local DNS server. The longer the duration is, the slower the update takes effect. If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value. Range: 1 to 2147483647 Default value: 300 |
|
private_domain_name_enable |
Boolean |
Definition: Specifies whether to enable private domain resolution. Range:
|
|
private_dns_zone_name |
String |
Definition: Specifies the zone that will be used to generate private domain names for the load balancer. Constraints:
|
|
private_dns_zone_id |
String |
Definition: Specifies the ID of the private zone. Constraints: The ID can be obtained based on the private zone name. |
|
private_domain_name |
String |
Definition: Specifies the private domain names of the load balancer. Constraints: The private domain names are generated in the following format: {lb_id}-internal.elb.{region_id}.{zone_name} |
|
private_dns_zone_type |
String |
Definition: Specifies the type of the zone that will be used to generate private domain names for the load balancer. Constraints: N/A Range: private or public Default value: private |
|
private_dns_record_set_ttl |
Integer |
Definition: Specifies the cache duration of the private record set on a local DNS server. The longer the duration is, the slower the update takes effect. If your service address changes frequently, set TTL to a smaller value. Otherwise, set TTL to a larger value. Range: 1 to 2147483647 Default value: 300 |
|
Parameter |
Type |
Description |
|---|---|---|
|
eip_id |
String |
Definition: Specifies the EIP ID. Range: N/A |
|
eip_address |
String |
Definition: Specifies the EIP. Range: N/A |
|
ip_version |
Integer |
Definition: Specifies the IP address version. Range:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
global_eip_id |
String |
Definition: Specifies the ID of the global EIP. Range: N/A |
|
global_eip_address |
String |
Definition: Specifies the global EIP. Range: N/A |
|
ip_version |
Integer |
Definition: Specifies the IP address version. Range:
|
Example Requests
Configuring system-defined domain name resolution for a load balancer
POST https://{ELB_Endpoint}/v3/{project_id}/elb/loadbalancers/{loadbalancer_id}/dns/system-default-config
{
"loadbalancer" : {
"public_domain_name_enable" : true,
"public_dns_record_set_ttl" : 233333,
"private_domain_name_enable" : true,
"private_dns_record_set_ttl" : 9999999
}
}
Example Responses
Status code: 200
Successful request.
{
"loadbalancer" : [ {
"vip_address" : "192.168.20.87"
}, {
"ipv6_vip_address" : "2001:db8:a583:682::10"
}, {
"eips" : null,
"eip_id" : "26000000-0000-0000-0000-000000000001",
"eip_address" : "10.185.106.199",
"ip_version" : 4
}, {
"global_eips" : null,
"global_eip_id" : "26000000-0000-0000-0000-000000000001",
"global_eip_address" : "2001:db8:a583:682::11",
"ip_version" : 6
}, {
"private_domain_name_enable" : true
}, {
"private_dns_zone_id" : "8a186e6692d7f30d0192d8472fba0479"
}, {
"private_dns_zone_name" : "test.private.com"
}, {
"private_domain_name" : "10000000-0000-0000-0000-000000000001-internal.huaweicloud-elb.com"
}, {
"private_dns_record_set_ttl" : 3500
}, {
"public_domain_name_enable" : true
}, {
"public_dns_zone_id" : "9a186e6692d7f30d0192d8472fba0479"
}, {
"public_dns_zone_name" : "test.public.com"
}, {
"public_domain_name" : "10000000-0000-0000-0000-000000000001.elb.huaweicloud-elb.com"
}, {
"public_dns_record_set_ttl" : 300
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful request. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot