All Products
Search
Document Center

Alibaba Cloud DNS:CreateCloudGtmMonitorTemplate

Last Updated:Dec 02, 2025

Creates a health check template based on the specified parameters.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

alidns:CreateCloudGtmMonitorTemplate

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AcceptLanguage

string

No

The language of the response. Valid values:

  • zh-CN: Chinese.

  • en-US: English. This is the default value.

en-US

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. Make sure that the client token is unique for each request. The token can contain a maximum of 64 ASCII characters.

1ae05db4-10e7-11ef-b126-00163e24****

Name

string

Yes

The name of the health check template. Name the template to easily identify the health check protocol.

Ping-IPv4

IpVersion

string

Yes

The IP address type for health checks.

  • IPv4: The destination address is an IPv4 address.

  • IPv6: The destination address is an IPv6 address.

IPv4

Protocol

string

Yes

The protocol for health checks on the destination IP address.

  • ping

  • tcp

  • http

  • https

ping

Interval

integer

Yes

The health check interval in seconds. The default value is 60. The minimum interval is 15 seconds, which is available only for Ultimate Edition instances.

60

Timeout

integer

Yes

The health check timeout in milliseconds. If a packet is not returned within the timeout period, the health check is considered to have timed out. Valid values:

  • 2000

  • 3000

  • 5000

  • 10000

5000

EvaluationCount

integer

Yes

The number of consecutive failures that must occur before the system considers the application service unhealthy. This setting helps prevent false alarms caused by transient issues such as network jitter. Valid values:

  • 1

  • 2

  • 3

2

FailureRate

integer

Yes

The failure rate threshold. An endpoint is considered unhealthy if the percentage of unhealthy detection points exceeds this value. Valid values:

  • 20

  • 50

  • 80

  • 100

50

ExtendInfo

string

No

The extended information in a JSON string. The parameters vary based on the protocol.

  • http(s):

    host: The Host field in the header of the HTTP or HTTPS request. This field identifies the website that you want to access. The default value is the primary domain name. If the destination website uses a specific host, change this value as needed.

    path: The URL path for the HTTP or HTTPS health check. The default value is "/".

    code: For an HTTP or HTTPS health check, the system determines whether the web server is working correctly based on the return code. If the return code is greater than this threshold, the system considers the application service unhealthy.

    • 400: Bad Request. If an HTTP or HTTPS request contains incorrect parameters, the web server returns a code greater than 400. If you set the threshold to 400, make sure that you specify the exact URL path.

    • 500: Server Error. If an exception occurs on the web server, it returns a code greater than 500. The default threshold is 500.

    sni: Specifies whether to enable Server Name Indication (SNI). This parameter applies only to the HTTPS protocol. SNI is a Transport Layer Security (TLS) extension that allows a client to specify the hostname to connect to at the start of the TLS handshake. This allows the server to present the correct certificate for the requested service.

    • true: Enable SNI.

    • false: Disable SNI.

    followRedirect: Specifies whether to follow 3xx redirects.

    • true: Follows the redirect if the detection point receives a 3xx status code, such as 301, 302, 303, 307, or 308.

    • false: Does not follow the redirect.

  • ping:

    packetNum: The number of ICMP packets to send for each ping health check. Valid values: 20, 50, and 100.

    packetLossRate: The packet loss rate that triggers an alarm. For each ping health check, the system calculates the packet loss rate based on the sent ICMP packets. Packet loss rate = (Number of lost packets / Total number of sent ICMP packets) × 100%. An alarm is triggered if the packet loss rate reaches this threshold. Valid values: 10, 30, 40, 80, 90, and 100.

{\"code\":200,\"path\":\"\\index.htm\",\"host\":\"aliyun.com\"}

IspCityNodes

array<object>

Yes

A list of detection points. For more information, see ListCloudGtmMonitorNodes.

object

No

A detection point.

CityCode

string

No

The city code for the detection point.

503

IspCode

string

No

The ISP code for the detection point.

465

Response elements

Element

Type

Description

Example

object

RequestId

string

The unique request ID.

B57C121B-A45F-44D8-A9B2-13E5A5044195

Success

boolean

Indicates whether the operation was successful.

  • true: The operation was successful.

  • false: The operation failed.

true

TemplateId

string

The ID of the health check template. The ID is the unique identifier of the template.

mtp-89518052425100****

Examples

Success response

JSON format

{
  "RequestId": "B57C121B-A45F-44D8-A9B2-13E5A5044195",
  "Success": true,
  "TemplateId": "mtp-89518052425100****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.