You can call this operation to create a health check 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 AddGtmMonitor

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

AddrPoolId String Yes xxxx

The ID of the address pool for which you want to create a health check.

EvaluationCount Integer Yes 3

The number of consecutive failed health check attempts.

Interval Integer Yes 60

The interval between health checks.

MonitorExtendInfo String Yes {\"code\":200,\"path\":\"/index.htm\",\"host\":\"aliyun.com\"}

The extended information of health checks.

ProtocolType String Yes HTTP

The protocol that you want to use for health checks. Valid values:

  • HTTP
  • HTTPS
  • PING
  • TCP
Timeout Integer Yes 3000

The time-out period that you want to set for health checks.

IspCityNode.N.CityCode String No 503

The code of the monitored city node.

IspCityNode.N.IspCode String No 465

The Internet service provider (ISP) code.

Lang String No en

The language used by the user.

Response parameters

Parameter Type Example Description
MonitorConfigId String 1234abc

The health check ID.

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

The ID of the request.

Examples

Sample requests


http(s)://alidns.aliyuncs.com/? Action=AddGtmMonitor
&AddrPoolId=xxxx
&EvaluationCount=3
&Interval=60
&MonitorExtendInfo={\"code\":200,\"path\":\"\\index.htm\",\"host\":\"aliyun.com\"}
&ProtocolType=HTTP
&Timeout=3000
&<Common request parameters>

Sample success responses

XML format

<AddGtmMonitorResponse>
	  <RequestId>6856BCF6-11D6-4D7E-AC53-FD579933522B</RequestId>
	  <MonitorConfigId>1234abc</MonitorConfigId>
</AddGtmMonitorResponse>

JSON format

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

Error codes

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