Consulte les groupes de serveurs d'une instance Gateway Load Balancer (GWLB).
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
gwlb:ListServerGroups |
get |
ServerGroup
ServerGroup
VPC
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| ServerGroupIds |
array |
Non |
Les identifiants des groupes de serveurs. |
|
|
string |
Non |
L'identifiant du groupe de serveurs. |
sgp-atstuj3rtoptyui**** |
|
| ServerGroupNames |
array |
Non |
Les noms des groupes de serveurs. |
|
|
string |
Non |
Le nom du groupe de serveurs. |
testServerGroupName |
|
| ServerGroupType |
string |
Non |
Le type de groupe de serveurs. Valeurs valides : |
Instance |
| ResourceGroupId |
string |
Non |
L'identifiant du groupe de ressources auquel l'instance appartient. |
rg-atstuj3rtop**** |
| Tag |
array<object> |
Non |
Les clés de balise. |
|
|
object |
Non |
La balise. |
||
| Key |
string |
Non |
La clé de balise. La clé de balise ne peut pas être une chaîne vide. La clé de balise peut comporter jusqu'à 128 caractères et ne peut pas commencer par acs: ou aliyun. La clé de balise ne peut pas contenir http:// ou https://. |
testTagKey |
| Value |
string |
Non |
La valeur de balise. La valeur de balise peut comporter jusqu'à 256 caractères et ne peut pas contenir http:// ou https://. |
testTagValue |
| VpcId |
string |
Non |
L'identifiant du VPC. |
vpc-bp15zckdt37pq72zv**** |
| NextToken |
string |
Non |
Le jeton de pagination utilisé dans la requête suivante pour récupérer une nouvelle page de résultats. Valeurs valides : |
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
Non |
Le nombre d'entrées par page. |
20 |
| Skip |
integer |
Non |
Le nombre d'entrées à ignorer dans l'appel. |
1 |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les paramètres de réponse. |
||
| MaxResults |
integer |
Le nombre d'entrées par page. |
20 |
| NextToken |
string |
Un jeton de pagination. Il peut être utilisé dans la requête suivante pour récupérer une nouvelle page de résultats. Valeurs valides : |
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
L'identifiant de la requête. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
| ServerGroups |
array<object> |
Les configurations des groupes de serveurs. |
|
|
array<object> |
Le groupe de serveurs. |
||
| ConnectionDrainConfig |
object |
La configuration du vidage des connexions. |
|
| ConnectionDrainEnabled |
boolean |
Indicates whether connection draining is enabled. Valid values:
|
false |
| ConnectionDrainTimeout |
integer |
The timeout period of connection draining. Unit: seconds Valid values: 1 to 3600. |
300 |
| CreateTime |
string |
L'heure de création de la ressource. L'heure suit la norme ISO 8601 au format yyyy-MM-ddTHH:mm:ssZ. L'heure est affichée en UTC. |
2024-08-05T18:24:07Z |
| HealthCheckConfig |
object |
La configuration des contrôles d'état de santé. |
|
| HealthCheckConnectPort |
integer |
The backend server port that is used for health checks. Valid values: 1 to 65535. |
80 |
| HealthCheckConnectTimeout |
integer |
The maximum timeout period of a health check. Unit: seconds Valid values: 1 to 300. |
5 |
| HealthCheckDomain |
string |
The domain name that is used for health checks. Valid values:
Remarque
This parameter takes effect only if you set HealthCheckProtocol to HTTP. |
$SERVER_IP |
| HealthCheckEnabled |
boolean |
Indicates whether the health check feature is enabled. Valid values:
|
true |
| HealthCheckHttpCode |
array |
The HTTP status codes that the system returns for health checks. |
|
|
string |
The HTTP status code to return for health checks. Separate multiple HTTP status codes with commas (,). Valid values:
Default value: http_2xx. Remarque
This parameter takes effect only if you set HealthCheckProtocol to HTTP. |
http_2xx |
|
| HealthCheckInterval |
integer |
The interval at which health checks are performed. Unit: seconds Valid values: 1 to 50. |
10 |
| HealthCheckPath |
string |
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: Remarque
This parameter takes effect only if you set HealthCheckProtocol to HTTP. |
/test/index.html |
| HealthCheckProtocol |
string |
The protocol that is used for health checks. Valid values:
|
TCP |
| 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. |
2 |
| HealthCheckReq |
string |
||
| HealthCheckExp |
string |
||
| Protocol |
string |
Le protocole backend. Valeurs valides : |
GENEVE |
| RelatedLoadBalancerIds |
array |
Les identifiants des instances GWLB associées au groupe de serveurs. |
|
|
string |
L'identifiant de l'instance GWLB associée au groupe de serveurs. |
gwlb-cp6prgqy40hols**** |
|
| ResourceGroupId |
string |
L'identifiant du groupe de ressources. |
rg-atstuj3rtop**** |
| Scheduler |
string |
L'algorithme de planification. Valeurs valides : |
5TCH |
| ServerCount |
integer |
Le nombre de serveurs du groupe. |
2 |
| ServerGroupId |
string |
L'identifiant du groupe de serveurs. |
sgp-atstuj3rtoptyui**** |
| ServerGroupName |
string |
Le nom du groupe de serveurs. |
testServerGroupName |
| ServerGroupStatus |
string |
L'état du groupe de serveurs. Valeurs valides : |
Available |
| ServerGroupType |
string |
Le type de groupe de serveurs. Valeurs valides : |
Instance |
| ServerFailoverMode |
string |
Spécifie comment GWLB traite les requêtes sur les connexions existantes lorsqu'un serveur backend ne fonctionne pas comme prévu. Valeurs valides : |
NoRebalance |
| Tags |
array<object> |
Les balises. |
|
|
object |
La balise. |
||
| Key |
string |
The tag key. The tag key cannot be an empty string. The tag key can be up to 128 characters in length, and cannot start with |
testTagKey |
| Value |
string |
The tag value. The tag value can be up to 256 characters in length and cannot contain |
testTagValue |
| VpcId |
string |
L'identifiant du VPC. |
vpc-bp15zckdt37pq72zv**** |
| TotalCount |
integer |
Le nombre total d'entrées renvoyées. |
1 |
Exemples
JSON format
{
"MaxResults": 20,
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
"ServerGroups": [
{
"ConnectionDrainConfig": {
"ConnectionDrainEnabled": false,
"ConnectionDrainTimeout": 300
},
"CreateTime": "2024-08-05T18:24:07Z",
"HealthCheckConfig": {
"HealthCheckConnectPort": 80,
"HealthCheckConnectTimeout": 5,
"HealthCheckDomain": "$SERVER_IP",
"HealthCheckEnabled": true,
"HealthCheckHttpCode": [
"http_2xx"
],
"HealthCheckInterval": 10,
"HealthCheckPath": "/test/index.html",
"HealthCheckProtocol": "TCP",
"HealthyThreshold": 2,
"UnhealthyThreshold": 2,
"HealthCheckReq": "",
"HealthCheckExp": ""
},
"Protocol": "GENEVE",
"RelatedLoadBalancerIds": [
"gwlb-cp6prgqy40hols****"
],
"ResourceGroupId": "rg-atstuj3rtop****",
"Scheduler": "5TCH",
"ServerCount": 2,
"ServerGroupId": "sgp-atstuj3rtoptyui****",
"ServerGroupName": "testServerGroupName",
"ServerGroupStatus": "Available",
"ServerGroupType": "Instance",
"ServerFailoverMode": "NoRebalance",
"Tags": [
{
"Key": "testTagKey",
"Value": "testTagValue"
}
],
"VpcId": "vpc-bp15zckdt37pq72zv****"
}
],
"TotalCount": 1
}
Codes d'erreur
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.