tencent cloud

ModifyLoadBalancerBackends

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-11-20 15:20:22

API Description

This API is used to modify the weight of CVMs bound to a CLB instance, thereby adjusting the request forwarding rule.
Domain name for API calls: lb.api.qcloud.com

Request Parameters

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 ModifyLoadBalancerBackends.
Parameter
Required
Type
Description
loadBalancerId
Yes
String
CLB instance ID, which can be queried via the DescribeLoadBalancers API.
backends.n.instanceId
Yes
String
Unique ID of the CVM, which can be obtained from the `unInstanceId` field in the response of the DescribeInstances API.This API supports entering multiple CVM instance IDs at a time. For example, if you want to specify two CVMs, enter backends.0.instanceId&backends.1.instanceId.
backends.n.weight
Yes
Int
Weight of the bound CVMs. Value range: 0-100. Default value: 10.

Response Parameters

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.
requestId
Int
Request task ID. The API provides an asynchronous task. You can use this parameter to query the execution result of the task via the DescribeLoadBalancersTaskResult API.

Example

Request
https://lb.api.qcloud.com/v2/index.php?Action=ModifyLoadBalancerBackends
&loadBalancerId=lb-abcdefgh
&backends.0.instanceId=ins-6789test
&backends.0.weight=10
&backends.1.instanceId=ins-1234test
&backends.1.weight=6
Response

{
"code" : 0,
"message" : "",
"codeDesc": "Success",
"requestId" : 1234
}



도움말 및 지원

문제 해결에 도움이 되었나요?

피드백