Mengkueri templat pemeriksaan kesehatan di suatu wilayah.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alb:ListHealthCheckTemplates |
list |
*HealthCheckTemplate
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| NextToken |
string |
No |
Token paginasi yang digunakan di permintaan berikutnya untuk mengambil halaman hasil baru. Nilai valid:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
No |
Jumlah entri yang dikembalikan setiap pemanggilan. Nilai valid: 1 hingga 100. Nilai default: 20. |
50 |
| HealthCheckTemplateIds |
array |
No |
ID templat pemeriksaan kesehatan. |
|
|
string |
No |
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. |
hct-bp1qjwo61pqz3ahltv**** |
|
| HealthCheckTemplateNames |
array |
No |
Templat pemeriksaan kesehatan. |
|
|
string |
No |
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. |
test |
|
| Tag |
array<object> |
No |
Tag. |
|
|
object |
No |
The tags. |
||
| Key |
string |
No |
The tag key. The tag key can be up to 128 characters in length and cannot start with |
env |
| Value |
string |
No |
The tag value. The tag value can be up to 128 characters in length and cannot start with |
product |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya. Anda dapat memfilter hasil kueri berdasarkan ID yang ditentukan. |
rg-atstuj3rtop**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The information about the health check templates. |
||
| HealthCheckTemplates |
array<object> |
The health check templates. |
|
|
array<object> |
The information about the health check template. |
||
| HealthCheckConnectPort |
integer |
The port that is used for health checks. Valid values: ** 0 to 65535**. The default value is 0, which specifies that the port of a backend server is used for health checks. |
80 |
| HealthCheckHost |
string |
The domain name that is used for health checks. Valid values:
Catatan
This parameter takes effect only if you set |
$_ip |
| HealthCheckCodes |
array |
The HTTP status codes that indicate healthy backend servers. |
|
|
string |
The HTTP status code that indicates healthy backend servers.
Catatan
This parameter takes effect only if you set HealthCheckProtocol to HTTP, HTTPS, or gRPC. |
http_2xx,http_3xx |
|
| HealthCheckHttpVersion |
string |
The HTTP version for health checks. Valid values: HTTP 1.0 and HTTP 1.1. Default value: HTTP 1.1. Catatan
This parameter takes effect only if you set |
HTTP 1.0 |
| HealthCheckInterval |
integer |
The interval at which health checks are performed. Unit: seconds. Valid values: 1 to 50. Default value: 2. |
5 |
| HealthCheckMethod |
string |
The HTTP method that is used for health checks. Valid values:
Catatan
This parameter takes effect only if you set HealthCheckProtocol to HTTP, HTTPS, or gRPC. |
HEAD |
| HealthCheckPath |
string |
The URL path that you want to use for health checks. The URL must be 1 to 80 characters in length, and can contain letters, digits, the following special characters: - / . % ? # &, and the following extended characters: |
/test/index.html |
| HealthCheckProtocol |
string |
The protocol that is used for health checks. Valid values:
|
HTTP |
| HealthCheckTemplateId |
string |
The ID of the health check template. |
hct-bp1qjwo61pqz3ahltv**** |
| HealthCheckTemplateName |
string |
The name of the health check template. The name must be 2 to 128 character characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. |
HealthCheckTemplate1 |
| HealthCheckTimeout |
integer |
The timeout period of a health check response. If a backend Elastic Compute Service (ECS) instance does not respond within the specified timeout period, the ECS instance fails to pass the health check. Valid values: 1 to 300. Unit: seconds. Default value: 5. |
3 |
| HealthyThreshold |
integer |
The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status changes from fail to success. Valid values: 2 to 10. Default value: 3. |
4 |
| UnhealthyThreshold |
integer |
The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status changes from success to fail. Valid values: 2 to 10. Default value: 3. |
4 |
| Tags |
array<object> |
The tags. |
|
|
object |
The tags. |
||
| Key |
string |
The tag key. The tag key can be up to 128 characters in length, and cannot contain |
env |
| Value |
string |
The tag value. The tag value can be up to 128 characters in length, and cannot contain |
product |
| ResourceGroupId |
string |
The resource group ID. |
rg-atstuj3rtop**** |
| MaxResults |
integer |
The number of entries returned per page. Valid values: 1 to 100. Default value: 20. |
50 |
| NextToken |
string |
The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
The request ID. |
365F4154-92F6-4AE4-92F8-7FF34B540710 |
| TotalCount |
integer |
The total number of entries returned. |
1000 |
Contoh
Respons sukses
JSONformat
{
"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,
"Tags": [
{
"Key": "env",
"Value": "product"
}
],
"ResourceGroupId": "rg-atstuj3rtop****"
}
],
"MaxResults": 50,
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
"TotalCount": 1000
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden.HealthCheckTemplate | Authentication has failed for HealthCheckTemplate. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.