All Products
Search
Document Center

AddDnsGtmMonitor (new)

Last Updated: Feb 07, 2021

Creates a health check task for an address pool of 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

AddDnsGtmMonitor

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

AddrPoolId

String

Yes

pool1

The ID of the address pool.

EvaluationCount

Integer

Yes

1

The number of consecutive times of failed health check attempts.

Interval

Integer

Yes

60

The health check interval. Unit: seconds.

MonitorExtendInfo

String

Yes

{"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

ProtocolType

String

Yes

http

The health check protocol. Valid values:

  • HTTP

  • HTTPS

  • PING

  • TCP

Timeout

Integer

Yes

30000

The timeout period. Unit: milliseconds.

Lang

String

No

en

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

IspCityNode.N.CityCode

String

No

123

The code of the city node to monitor.

IspCityNode.N.IspCode

String

No

123

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

Response parameters

Parameter

Type

Example

Description

MonitorConfigId

String

MonitorConfigId1

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=AddDnsGtmMonitor
&AddrPoolId=pool1
&EvaluationCount=1
&Interval=60
&MonitorExtendInfo={\"code\":200,\"path\":\"\\index.htm\",\"host\":\"aliyun.com\"}
&ProtocolType=http
&Timeout=30000
&<Common request parameters>

Sample success responses

XML format

<RequestId>6856BCF6-11D6-4D7E-AC53-FD579933522B</RequestId>
<MonitorConfigId>MonitorConfigId1</MonitorConfigId>

JSON format

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

Error codes

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