Mengkueri kelompok server dari instans Network Load Balancer (NLB).
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nlb:ListServerGroups |
get |
ServerGroup
ServerGroup
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ServerGroupIds |
array |
No |
ID kelompok server. Anda dapat mengkueri hingga 20 ID kelompok server sekaligus. |
|
|
string |
No |
ID kelompok server. Anda dapat mengkueri hingga 20 ID kelompok server sekaligus. |
sgp-atstuj3rtoptyui**** |
|
| ServerGroupNames |
array |
No |
Nama kelompok server. Anda dapat mengkueri hingga 20 nama kelompok server sekaligus. |
|
|
string |
No |
Nama kelompok server. Anda dapat mengkueri hingga 20 nama kelompok server sekaligus. |
NLB_ServerGroup |
|
| ResourceGroupId |
string |
No |
ID kelompok sumber daya tempat kelompok server berada. |
rg-atstuj3rtop**** |
| ServerGroupType |
string |
No |
Tipe kelompok server. Nilai valid:
|
Instance |
| VpcId |
string |
No |
ID VPC tempat kelompok server berada. |
vpc-bp15zckdt37pq72zv**** |
| Tag |
array<object> |
No |
Tag. |
|
|
object |
No |
Tag. |
||
| Key |
string |
No |
Kunci tag. Anda dapat menentukan hingga 10 kunci tag. Panjang kunci tag maksimal 64 karakter dan tidak boleh diawali dengan |
Test |
| Value |
string |
No |
Nilai tag. Anda dapat menentukan hingga 10 nilai tag. Panjang nilai tag maksimal 128 karakter dan tidak boleh diawali dengan |
Test |
| NextToken |
string |
No |
Token paginasi yang digunakan dalam permintaan berikutnya untuk mengambil halaman hasil baru. Nilai valid:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
No |
Jumlah entri per halaman. Nilai valid: 1 hingga 100. Nilai default: 20. |
20 |
| RegionId |
string |
No |
ID wilayah instans load balancing Network Load Balancer (NLB). Anda dapat memanggil operasi DescribeRegions untuk mengkueri ID wilayah. |
cn-hangzhou |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Tanggapan untuk mengkueri kelompok server. |
||
| RequestId |
string |
ID permintaan. |
54B28E3D-DF70-471B-AA93-08E683A1B45 |
| ServerGroups |
array<object> |
Daftar kelompok server backend. |
|
|
array<object> |
Daftar kelompok server backend. |
||
| RegionId |
string |
ID wilayah instans load balancing Network Load Balancer (NLB). |
cn-hangzhou |
| ServerGroupId |
string |
ID kelompok server. |
sgp-atstuj3rtoptyui**** |
| ServerGroupName |
string |
Nama kelompok server. |
NLB_ServerGroup |
| ServerGroupType |
string |
Tipe kelompok server. Nilai valid:
|
Instance |
| AddressIPVersion |
string |
Versi protokol. Nilai valid:
|
ipv4 |
| VpcId |
string |
ID VPC tempat kelompok server berada. |
vpc-bp15zckdt37pq72zv**** |
| Scheduler |
string |
Algoritma penjadwalan. Nilai valid:
|
Wrr |
| Protocol |
string |
Protokol penerusan backend. Nilai valid: TCP dan UDP. |
TCP |
| HealthCheck |
object |
Konfigurasi pemeriksaan kesehatan. |
|
| HealthCheckEnabled |
boolean |
Indicates whether the health check feature is enabled. Valid values:
|
false |
| HealthCheckType |
string |
The protocol that is used for health checks. Valid values:
|
TCP |
| HealthCheckConnectPort |
integer |
The backend port that is used for health checks. Valid values: 0 to 65535. A value of 0 indicates that the port on a backend server is used for health checks. |
200 |
| 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. |
2 |
| 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. |
3 |
| HealthCheckConnectTimeout |
integer |
The maximum timeout period of a health check response. Unit: seconds. Default value: 5. Valid values: 1 to 300 |
200 |
| HealthCheckInterval |
integer |
The interval at which health checks are performed. Unit: seconds. Default value: 5.
|
10 |
| HealthCheckDomain |
string |
The domain name that you want to use for health checks. Valid values:
Catatan
This parameter takes effect only when HealthCheckType is set to HTTP. |
$SERVER_IP |
| HealthCheckUrl |
string |
The path to which health check probes are sent. Catatan
This parameter takes effect only when HealthCheckType is set to HTTP. |
/test/index.html |
| HealthCheckHttpCode |
array |
The HTTP status codes returned for health checks. Multiple HTTP status codes are separated by commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Catatan
This parameter takes effect only when HealthCheckType is set to HTTP. |
|
|
string |
The HTTP status codes returned for health checks. Multiple HTTP status codes are separated by commas (,). Valid values: http_2xx, http_3xx, http_4xx, and http_5xx. Catatan
This parameter takes effect only when HealthCheckType is set to HTTP. |
http_2xx |
|
| HttpCheckMethod |
string |
The HTTP method that is used for health checks. Valid values: GET and HEAD. Catatan
This parameter takes effect only when HealthCheckType is set to HTTP. |
GET |
| HealthCheckReq |
string |
The request string of UDP health checks. The string must be 1 to 512 characters in length, and can contain letters and digits. |
hello |
| HealthCheckExp |
string |
The response string of UDP health checks. The string must be 1 to 512 characters in length, and can contain letters and digits. |
ok |
| HealthCheckHttpVersion |
string |
The version of the HTTP protocol. Valid values: HTTP1.0 and HTTP1.1. Catatan
This parameter takes effect only if you set HealthCheckType to HTTP. |
HTTP1.0 |
| ConnectionDrainEnabled |
boolean |
Menunjukkan apakah pengurasan koneksi diaktifkan. Nilai valid:
|
false |
| ConnectionDrainTimeout |
integer |
Periode pengatur waktu pengurasan koneksi. Unit: detik. Nilai valid: 10 hingga 900. |
200 |
| PreserveClientIpEnabled |
boolean |
Menunjukkan apakah pelestarian IP klien diaktifkan. Nilai valid:
Catatan
Ketika AddressIPVersion diatur ke ipv4, nilai default adalah true. Ketika AddressIPVersion diatur ke ipv6, nilai hanya boleh false. Ini akan diubah menjadi true setelah infrastruktur dasar mendukungnya. |
true |
| AnyPortEnabled |
boolean |
Menunjukkan apakah Penerusan port semua Port diaktifkan. Nilai valid:
|
false |
| ResourceGroupId |
string |
ID kelompok sumber daya tempat kelompok server berada. |
rg-atstuj3rtop**** |
| ServerGroupStatus |
string |
Status kelompok server. Nilai valid:
|
Available |
| AliUid |
integer |
UID pengguna. |
165820696622**** |
| Tags |
array<object> |
Tag. |
|
|
object |
Tag. |
||
| Key |
string |
The tag key. At most 10 tag keys are returned. The tag key can be up to 64 characters in length, and cannot contain |
Test |
| Value |
string |
The tag value. At most 10 tag values are returned. The tag value can be up to 128 characters in length, and cannot contain |
Test |
| RelatedLoadBalancerIds |
array |
Daftar instans load balancing Network Load Balancer (NLB). |
|
|
string |
Daftar instans load balancing Network Load Balancer (NLB). |
nlb-83ckzc8d4xlp8o**** |
|
| ServerCount |
integer |
Jumlah server backend. |
2 |
| IpVersionAffinityMode |
string |
Kebijakan penjadwalan trafik dalam mode dual-stack:
Catatan
Parameter ini hanya berlaku ketika AddressIPVersion diatur ke DualStack. |
Affinity |
| TotalCount |
integer |
Jumlah total entri yang dikembalikan. |
1 |
| NextToken |
string |
Token paginasi yang digunakan dalam permintaan berikutnya untuk mengambil halaman hasil baru. Nilai valid:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
Jumlah entri per halaman. Nilai valid: 1 hingga 100. |
20 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "54B28E3D-DF70-471B-AA93-08E683A1B45",
"ServerGroups": [
{
"RegionId": "cn-hangzhou",
"ServerGroupId": "sgp-atstuj3rtoptyui****",
"ServerGroupName": "NLB_ServerGroup",
"ServerGroupType": "Instance",
"AddressIPVersion": "ipv4",
"VpcId": "vpc-bp15zckdt37pq72zv****",
"Scheduler": "Wrr",
"Protocol": "TCP",
"HealthCheck": {
"HealthCheckEnabled": false,
"HealthCheckType": "TCP",
"HealthCheckConnectPort": 200,
"HealthyThreshold": 2,
"UnhealthyThreshold": 3,
"HealthCheckConnectTimeout": 200,
"HealthCheckInterval": 10,
"HealthCheckDomain": "$SERVER_IP",
"HealthCheckUrl": "/test/index.html",
"HealthCheckHttpCode": [
"http_2xx"
],
"HttpCheckMethod": "GET",
"HealthCheckReq": "hello",
"HealthCheckExp": "ok",
"HealthCheckHttpVersion": "HTTP1.0"
},
"ConnectionDrainEnabled": false,
"ConnectionDrainTimeout": 200,
"PreserveClientIpEnabled": true,
"AnyPortEnabled": false,
"ResourceGroupId": "rg-atstuj3rtop****",
"ServerGroupStatus": "Available",
"AliUid": 0,
"Tags": [
{
"Key": "Test",
"Value": "Test"
}
],
"RelatedLoadBalancerIds": [
"nlb-83ckzc8d4xlp8o****"
],
"ServerCount": 2,
"IpVersionAffinityMode": "Affinity"
}
],
"TotalCount": 1,
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"MaxResults": 20
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | SystemBusy | System is busy, please try again later. | |
| 403 | Forbidden.%s | Authentication is failed for %s. | |
| 403 | Forbidden.NoPermission | Authentication is failed for NoPermission. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.