Create a health check template in a specified region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alb:CreateHealthCheckTemplate |
create |
*HealthCheckTemplate
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token used to ensure the idempotence of the request. You can generate this token, but you must ensure that it is unique across requests. The token can contain only ASCII characters. Note
If you do not specify this parameter, the system uses the |
5A2CFF0E-5718-45B5-9D4D-70B****** |
| HealthCheckTemplateName |
string |
Yes |
The name of the health check template. The name must be 2 to 128 characters in length, must start with a letter, a digit, or a Chinese character, and can contain digits, periods (.), underscores (_), hyphens (-), and spaces. |
HealthCheckTemplate1 |
| HealthCheckConnectPort |
integer |
No |
The port used for health checks. Valid values: 0 to 65535. Default value: 0. This value indicates that the port of a backend server is used for health checks. |
80 |
| HealthCheckHost |
string |
No |
The domain name used for the health check. Valid values:
Note
This parameter takes effect only when the |
$SERVER_IP |
| HealthCheckCodes |
array |
No |
The HTTP status codes that indicate a successful health check. |
5 |
|
string |
No |
The HTTP status codes that indicate a successful health check.
Note
This parameter takes effect only when the |
http_2xx |
|
| HealthCheckInterval |
integer |
No |
The interval at which health checks are performed. Valid values: 1 to 50. Unit: seconds. Default value: 2. Unit: seconds. |
2 |
| HealthCheckTimeout |
integer |
No |
The timeout period for a health check response. If a backend server does not respond within this period, the health check fails. Valid values: 1 to 300. Unit: seconds. Default value: 5. Unit: seconds. |
5 |
| HealthCheckPath |
string |
No |
The URL that is used for health checks. The URL must be 1 to 80 characters in length. It must start with a forward slash (/) and can contain letters, digits, and the following special characters: Note
This parameter takes effect only when the |
/test/index.html |
| HealthCheckMethod |
string |
No |
The method used for the health check. Valid values:
Note
This parameter takes effect only when the |
HEAD |
| HealthCheckProtocol |
string |
No |
The protocol used for the health check. Valid values:
|
HTTP |
| HealthCheckHttpVersion |
string |
No |
The version of the HTTP protocol that is used for the health check. Valid values: HTTP1.0 and HTTP1.1. Default value: HTTP1.1. Note
This parameter takes effect only when the |
HTTP 1.0 |
| HealthyThreshold |
integer |
No |
The number of consecutive successful health checks required to change the health status of a backend server from unhealthy to healthy. Valid values: 2 to 10. Default value: 3. |
4 |
| UnhealthyThreshold |
integer |
No |
The number of consecutive failed health checks required to change the health status of a backend server from healthy to unhealthy. Valid values: 2 to 10. Default value: 3. |
4 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
true |
| Tag |
array<object> |
No |
The tags. |
|
|
object |
No |
The tags. |
||
| Key |
string |
No |
The tag key. The tag key can be up to 128 characters in length. It cannot start with |
env |
| Value |
string |
No |
The tag value. The tag value can be up to 128 characters in length. It cannot start with |
product |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-atstuj3rtop**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The health check template object. |
||
| HealthCheckTemplateId |
string |
The ID of the health check template. |
hct-pno8sisi****** |
| RequestId |
string |
The ID of the request. |
365F4154-92F6-4AE4-92F8-7FF34****** |
Examples
Success response
JSON format
{
"HealthCheckTemplateId": "hct-pno8sisi******",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34******"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | QuotaExceeded.HealthCheckTemplatesNum | The quota of %s is exceeded, usage %s/%s. | The quota of %s is exceeded. Usage: %s/%s. |
| 403 | Forbidden.HealthCheckTemplate | Authentication has failed for HealthCheckTemplate. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.