All Products
Search
Document Center

AddDnsGtmAddressPool (new)

Last Updated: Mar 04, 2021

Creates an address pool for a Global Traffic Manager (GTM) instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action

String

Yes

AddDnsGtmAddressPool

The operation that you want to perform. Set the value to AddDnsGtmAddressPool.

Addr.N.Addr

String

Yes

1.1.1.1

The address that you want to add to the address pool.

Addr.N.AttributeInfo

String

Yes

default

The source region of the address, in JSON-formatted string.

  • LineCode: The line code of the source region of the address.(Abused, based on lineCodes data)

  • LineCodes: List of home lineCodes

  • lineCodeRectifyType: The rectification type of the line code. Default value: AUTO. Valid values:

    • NO_NEED: no need for rectification

    • RECTIFIED: rectified

    • AUTO: automatic rectification

Addr.N.Mode

String

Yes

online

The type of the address. Valid values:

  • SMART: smart return

  • ONLINE: always online

  • OFFLINE: always offline

InstanceId

String

Yes

instance1

The ID of the instance.

LbaStrategy

String

Yes

all_rr

The load balancing policy of the address pool. Valid values:

  • ALL_RR: returns all addresses.

  • RATIO: returns addresses by weight.

Name

String

Yes

test

The name of the address pool.

Type

String

Yes

ipv4

The type of the address pool. Valid values:

  • IPV4: IPv4 address

  • IPV6: IPv6 address

  • DOMAIN: domain name

Lang

String

No

en

The language to return some response parameters. Default value: en. Valid values: en, zh, and ja.

Addr.N.LbaWeight

Integer

No

1

The weight of the address.

Addr.N.Remark

String

No

test

The description of the address.

MonitorStatus

String

No

open

Specifies whether to enable the health check feature. The system validates the health check configurations if this parameter is set to OPEN. Otherwise, the configurations are discarded. Default value: CLOSE. Valid values:

  • OPEN: enable

  • CLOSE: disable

ProtocolType

String

No

http

The health check protocol. Valid values:

  • HTTP

  • HTTPS

  • PING

  • TCP

Interval

Integer

No

1

The health check interval. Unit: seconds.

EvaluationCount

Integer

No

1

The number of consecutive times of failed health check attempts.

Timeout

Integer

No

1

The period of health check timeout. Unit: milliseconds.

MonitorExtendInfo

String

No

{"port":80,"host":"example.com","path":"/","code":"400","failureRate":"50","packetNum":"20","packetLossRate":"10","sni":true,"nodeType":"IPV6"}

The extendedinformation. The following parameters are required for different health checkprotocols:

  • HTTP or HTTPS:

    • port: the check port.

    • path: the URL.

    • code: the return code greater thanwhich indicates that an error has occurred.

    • failureRate: the failure rate.

    • sni: specifies whether to enable server name indication (SNI). Thisparameter is used only for the HTTPS protocol. Valid values:

      • false:disabled

      • true: enabled

    • nodeType: the type of the node tomonitor when the address pool type is DOMAIN. Valid values:

      • IPV4

      • IPV6

  • PING:

    • failureRate: the failure rate.

    • packetNum: the number of ping packets.

    • packetLossRate: the loss rate of ping packets.

    • nodeType: the type of the node to monitor when the address pool type is DOMAIN. Valid values:

      • IPV4

      • IPV6

  • TCP:

    • port: the check port.

    • failureRate: the failure rate.

    • nodeType: the type of the node to monitor when the address pool type is DOMAIN. Valid values:

      • IPV4

      • IPV6

IspCityNode.N.CityCode

String

No

503

The code of the city node to monitor.

IspCityNode.N.IspCode

String

No

465

The code of the Internet provider service (ISP) node to monitor.

Response parameters

Parameter

Type

Example

Description

AddrPoolId

String

testpool1

The ID of the address pool.

MonitorConfigId

String

test1

The ID of the health check task.

RequestId

String

6856BCF6-11D6-4D7E-AC53-FD579933522B

The ID of the request.

Examples

Sample requests

http(s)://alidns.aliyuncs.com/? Action=AddDnsGtmAddressPool
&Addr.1.Addr=1.1.1.1
&Addr.1.AttributeInfo=default
&Addr.1.Mode=online
&InstanceId=instance1
&LbaStrategy=all_rr
&Name=test
&Type=ipv4
&<Common request parameters>

Sample success responses

XML format

<RequestId>6856BCF6-11D6-4D7E-AC53-FD579933522B</RequestId>
<AddrPoolId>testpool1</AddrPoolId>
<MonitorConfigId>test1</MonitorConfigId>

JSON format

{
        "RequestId": "6856BCF6-11D6-4D7E-AC53-FD579933522B",
        "AddrPoolId": "testpool1",
        "MonitorConfigId": "test1"
}

Error codes

For a list of error codes, visit the API Error Center.