This API is used to query the list of CVMs bound to the CLB instance by instance ID.
Domain name for API calls: lb.api.qcloud.com
The list below contains only the API request parameters. Common parameters should be added when you call the API. For more information, see Common Request Parameters. The Action
field for this API is DescribeLoadBalancerBackends
.
Parameter | Required | Type | Description |
---|---|---|---|
loadBalancerId | Yes | String | CLB instance ID, which can be queried via the DescribeLoadBalancers API. |
Parameter | Type | Description |
---|---|---|
code | Int | Common error code. 0: success; other values: failure. For more information, see Common Error Codes. | |
message | String | API-related module error message description. | |
codeDesc | String | Error code. For a successful operation, "Success" is returned. For a failed operation, a message describing the failure is returned. |
totalCount | Int | Total number of CVMs bound to this CLB instance. |
backendSet | Array | Array of real servers returned. |
Structure of the backendSet
array:
Parameter | Type | Description |
---|---|---|
instanceId | String | CVM instance ID. |
unInstanceId | String | CVM instance ID. This parameter supports all operations of `instanceId`. We recommend using it. |
weight | Int | Weight of the CVM instance. |
instanceName | String | Name of the CVM instance. |
lanIp | String | Private IP of the CVM instance. |
wanIpSet | Array | Public IP of the CVM instance. |
instanceStatus | Int
td> Status of the CVM instance. 1: failed; 2: running; 3: creating; 4: shut down; 5: returned; 6: returning; 7: restarting; 8: starting; 9: shutting down; 10: resetting password; 11: formatting; 12: creating image; 13: setting bandwidth; 14: reinstalling system; 19: upgrading; 21: hot migrating |
Request
https://lb.api.qcloud.com/v2/index.php?Action=DescribeLoadBalancerBackends &<Common request parameters> &loadBalancerId=lb-byhpduqt
Response
{
"code": 0,
"message": "",
"codeDesc": "Success",
"totalCount": 1,
"backendSet": [
{
"instanceId": "qcvmed9e93b0bb2784b043c983761e624639",
"unInstanceId": "ins-9o9ex9s0",
"instanceName": "test_k8s_1",
"lanIp": "10.104.222.152",
"wanIpSet": [
"193.112.93.144"
],
"instanceStatus": 4,
"weight": 44
}
]
}
문제 해결에 도움이 되었나요?