Queries the attributes of health check templates.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListHealthCheckTemplates |
The operation that you want to perform. Set the value to ListHealthCheckTemplates. |
NextToken | String | No | t-2343r |
The start position of the query. If this parameter is left empty, the query starts from the beginning. |
MaxResults | Integer | No | 50 |
The maximum number of entries to return. Valid values: 1 to 100. Default value: 20. This value indicates that this parameter is not set. |
HealthCheckTemplateIds | Array of String | No | hct-bp1qjwo61pqz3ahltv**** |
The IDs of health check templates. You can specify up to 20 IDs in each call. The results are filtered based on the specified IDs. |
HealthCheckTemplateNames | Array of String | No | test |
The names of health check templates. You can specify up to 10 names in each call. The results are filtered based on the specified names. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
HealthCheckTemplates | Array of HealthCheckTemplate |
The health check templates. |
|
HealthCheckConnectPort | Integer | 80 |
The port that is used for health checks. Valid values: 0 to 65535. Default value: 0. This value indicates that the port on a backend server is used for health checks. |
HealthCheckHost | String | $_ip |
The domain name that is used for health checks. Valid values: $SERVER_IP: the private IP addresses of backend servers. This is the default value. If this parameter is set to $SERVER_IP or is not set, Application Load Balancer (ALB) uses the private IP address of each backend server as the domain name for health checks. domain: The domain name must be 1 to 80 characters in length, and can contain only letters, digits, periods (.),and hyphens (-). Note This parameter is required only if the
HealthCheckProtocol parameter is set to HTTP.
|
HealthCheckCodes | Array of String | http_2xx,http_3xx |
The HTTP status code that indicates a successful health check. Default value: http_2xx. Separate multiple HTTP status codes with commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Note This parameter is required only if the
HealthCheckProtocol parameter is set to HTTP.
|
HealthCheckHttpVersion | String | HTTP 1.0 |
The version of the HTTP protocol. Valid values: HTTP 1.0 and HTTP 1.1. Default value: HTTP 1.1. Note This parameter is required only if the
HealthCheckProtocol parameter is set to HTTP.
|
HealthCheckInterval | Integer | 5 |
The time interval between two consecutive health checks. Unit: seconds. Valid values: 1 to 50. Default value: 2. |
HealthCheckMethod | String | HEAD |
The HTTP method that is used for health checks. Valid values: GET and HEAD. Default value: HEAD. Note This parameter is required only if the
HealthCheckProtocol parameter is set to HTTP.
|
HealthCheckPath | String | /test/index.html |
The URL that is used for health checks. The URL must be 1 to 80 characters in length, and can contain letters, digits, and the following special characters: - / . % ? # &. The URL can also contain the following extended characters:
The URL must start with a forward slash (/). |
HealthCheckProtocol | String | HTTP |
The protocol that is used for health checks. Valid values: HTTP and TCP. Default value: HTTP. |
HealthCheckTemplateId | String | hct-bp1qjwo61pqz3ahltv**** |
The ID of the health check template. |
HealthCheckTemplateName | String | HealthCheckTemplate1 |
The name of the health check template. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. |
HealthCheckTimeout | Integer | 3 |
The timeout period of a health check. Unit: seconds. If a backend server does not respond within the specified timeout period, the backend server fails the health check. Valid values: 1 to 300. Default value: 5. Note If the value of the HealthCheckTimeout parameter is smaller than that of the HealthCheckInterval parameter, the timeout period specified by the HealthCheckTimeout parameter is ignored and the period of time specified by the HealthCheckInterval parameter is used as the timeout period.
|
HealthyThreshold | Integer | 4 |
The number of health checks that an unhealthy backend server must consecutively pass before it is declared healthy. In this case, the health status is changed from fail to success. Valid values: 2 to 10. Default value: 3. |
UnhealthyThreshold | Integer | 4 |
The number of health checks that a healthy backend server must consecutively fail before it is declared unhealthy. In this case, the health status is changed from success to fail. Valid values: 2 to 10. Default value: 3. |
MaxResults | Integer | 50 |
The maximum number of entries returned. Valid values: 1 to 100. Default value: 20. This value indicates that this parameter is not set. |
NextToken | String | t-2343r |
The end position of the query. If the response does not contain this parameter, all data has been queried. |
RequestId | String | 365F4154-92F6-4AE4-92F8-7FF34B540710 |
The ID of the request. |
TotalCount | Integer | 1000 |
The total number of entries returned. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListHealthCheckTemplates
&NextToken=t-2343r
&MaxResults=50
&HealthCheckTemplateIds=["hct-bp1qjwo61pqz3ahltv****"]
&HealthCheckTemplateNames=["test"]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListHealthCheckTemplatesResponse>
<HealthCheckTemplates>
<HealthCheckConnectPort>80</HealthCheckConnectPort>
<HealthCheckHost>$_ip</HealthCheckHost>
<HealthCheckCodes>http_2xx,http_3xx</HealthCheckCodes>
<HealthCheckHttpVersion>HTTP 1.0</HealthCheckHttpVersion>
<HealthCheckInterval>5</HealthCheckInterval>
<HealthCheckMethod>HEAD</HealthCheckMethod>
<HealthCheckPath>/test/index.html</HealthCheckPath>
<HealthCheckProtocol>HTTP</HealthCheckProtocol>
<HealthCheckTemplateId>hct-bp1qjwo61pqz3ahltv****</HealthCheckTemplateId>
<HealthCheckTemplateName>HealthCheckTemplate1</HealthCheckTemplateName>
<HealthCheckTimeout>3</HealthCheckTimeout>
<HealthyThreshold>4</HealthyThreshold>
<UnhealthyThreshold>4</UnhealthyThreshold>
</HealthCheckTemplates>
<MaxResults>50</MaxResults>
<NextToken>t-2343r</NextToken>
<RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
<TotalCount>1000</TotalCount>
</ListHealthCheckTemplatesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"HealthCheckTemplates" : [ {
"HealthCheckConnectPort" : 80,
"HealthCheckHost" : "$_ip",
"HealthCheckCodes" : [ "http_2xx,http_3xx" ],
"HealthCheckHttpVersion" : "HTTP 1.0",
"HealthCheckInterval" : 5,
"HealthCheckMethod" : "HEAD",
"HealthCheckPath" : "/test/index.html",
"HealthCheckProtocol" : "HTTP",
"HealthCheckTemplateId" : "hct-bp1qjwo61pqz3ahltv****",
"HealthCheckTemplateName" : "HealthCheckTemplate1",
"HealthCheckTimeout" : 3,
"HealthyThreshold" : 4,
"UnhealthyThreshold" : 4
} ],
"MaxResults" : 50,
"NextToken" : "t-2343r",
"RequestId" : "365F4154-92F6-4AE4-92F8-7FF34B540710",
"TotalCount" : 1000
}
Error codes
For a list of error codes, visit the API Error Center.