ChangeLoadBalancerListenerBackendServerState
API Request
URLs
PUT zstack/v1/load-balancers/listeners/{listenerUuid}/servergroups/{serverGroupUuid}/backendservers/actionsHeaders
Authorization: OAuth the-session-uuidBody
Note: In the preceding example, the systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.
{
"changeLoadBalancerListenerBackendServerState": {
"vmNicUuids": [
"acd56cea809e3403b709cf8530575add"
],
"state": "Disabled"
},
"systemTags": [],
"userTags": []
}
Note: In the preceding example, the systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"changeLoadBalancerListenerBackendServerState":{"vmNicUuids":["acd56cea809e3403b709cf8530575add"],"state":"Disabled"}}' \
http://localhost:8080/zstack/v1/load-balancers/listeners/c4400f26d55c37dcbb4b538cb1e8b5ef/servergroups/4b3f55b00c153a7f8ab3c86daf45ed1a/backendservers/actionsRequest Parameters
| Name | Type | Location | Description | Optional Values | Starting Version |
|---|---|---|---|---|---|
| listenerUuid | String | url | The SLB listener UUID. | 5.5.38 | |
| serverGroupUuid | String | url | The backend server group UUID. | 5.5.38 | |
| vmNicUuids | List | body (contained in the changeLoadBalancerListenerBackendServerState structure) | Optional. The list of VM NIC UUIDs to enable or disable in the current backend server group. | 5.5.38 | |
| serverIps | List | body (contained in the changeLoadBalancerListenerBackendServerState structure) | Optional. The list of IP addresses to enable or disable in the current backend server group. Only supported by performance dedicated SLBs, and at least one of this parameter and vmNicUuids must be specified. | 5.5.38 | |
| state | String | body (contained in the changeLoadBalancerListenerBackendServerState structure) | The target administrative state of this operation. |
| 5.5.38 |
| systemTags | List | body | Optional. The system tags. | 5.5.38 | |
| userTags | List | body | Optional. The user tags. | 5.5.38 |
Note: This API only supports SLB provided by openEuler VPC routers and openEuler performance dedicated SLB (standalone SLB). VyOS is not supported.API Response
Sample Response
{
"results": [
{
"backendType": "VmNic",
"vmNicUuid": "926709422db736adb32b9d208afb6648",
"targetState": "Disabled",
"effectiveState": "Disabled"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeds. | 5.5.38 |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. See error. | 5.5.38 |
| results | List | See results. | 5.5.38 |
#results
| Name | Type | Description | Starting Version |
|---|---|---|---|
| backendType | String | The backend server type. Valid values: VmNic and ServerIp. | 5.5.38 |
| vmNicUuid | String | The VM NIC UUID. | 5.5.38 |
| serverIp | String | The IP address of the backend server. | 5.5.38 |
| targetState | String | The target administrative state of the request. | 5.5.38 |
| effectiveState | String | The administrative state that actually takes effect. | 5.5.38 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code, which is a globally unique identifier of the error, for example, SYS.1000 or HOST.1001. | 5.3.20 |
| description | String | The brief description of the error. | 5.3.20 |
| details | String | The details about the error. | 5.3.20 |
| elaboration | String | The reserved field. Default: null. | 5.3.20 |
| opaque | LinkedHashMap | The reserved field. Default: null. | 5.3.20 |
| cause | ErrorCode | The root error, which is the source error that causes the current error. If there is no source error, this field is null. | 5.3.20 |
SDK Sample
Java SDK
ChangeLoadBalancerListenerBackendServerStateAction action = new ChangeLoadBalancerListenerBackendServerStateAction();
action.listenerUuid = "c4400f26d55c37dcbb4b538cb1e8b5ef";
action.serverGroupUuid = "4b3f55b00c153a7f8ab3c86daf45ed1a";
action.vmNicUuids = asList("acd56cea809e3403b709cf8530575add");
action.state = "Disabled";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ChangeLoadBalancerListenerBackendServerStateAction.Result res = action.call();Python SDK
action = ChangeLoadBalancerListenerBackendServerStateAction()
action.listenerUuid = "c4400f26d55c37dcbb4b538cb1e8b5ef"
action.serverGroupUuid = "4b3f55b00c153a7f8ab3c86daf45ed1a"
action.vmNicUuids = ["acd56cea809e3403b709cf8530575add"]
action.state = "Disabled"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()