RemoveVmNicFromLoadBalancer
API Request
URLs
DELETE/v1/load-balancers/listeners/{listenerUuid}/vm-instances/nics?vmNicUuids={vmNicUuids}
Headers
Authorization: OAuth the-session-uuid
Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth a846184b54d845dbb85e50ba35364b6e" \
-X DELETE http://localhost:8080/zstack/v1/load-balancers/listeners/9fda51c382d841e0a47a4195f8dac67b/vm-instances/nics?vmNicUuids=9952aa24a745355b866782dd9b1c53e8
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
vmNicUuids | List | body | The VM NIC UUIDs. | 0.6 | |
listenerUuid | String | url | The UUID of the load balancer listener. | 0.6 | |
systemTags | List | body | Optional. The system tags. | 0.6 | |
userTags | List | body | Optional. The user tags. | 0.6 |
API Response
Sample
Response
{
"inventory": {
"name": "Test-Lb",
"uuid": "40f1e1e109d34feaa119ad14b7ed5638",
"vipUuid": "d3968f8dd2764d988f09b251617b2cf9"
}
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
inventory | LoadBalancerInventory | See inventory. | 0.6 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
#inventory
Name | Type | Description | Starting Version |
---|---|---|---|
name | String | The resource name. | 0.6 |
uuid | String | The resource UUID. | 0.6 |
description | String | The detailed description of the resource. | 0.6 |
state | String | 0.6 | |
vipUuid | String | The VIP UUID. | 0.6 |
listeners | List | See listeners. | 0.6 |
#listeners
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 0.6 |
name | String | The resource name. | 0.6 |
description | String | The detailed description of the resource. | 0.6 |
loadBalancerUuid | String | The load balancer UUID. | 0.6 |
instancePort | Integer | 0.6 | |
loadBalancerPort | Integer | 0.6 | |
protocol | String | 0.6 | |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
vmNicRefs | List | See vmNicRefs. | 0.6 |
#vmNicRefs
Name | Type | Description | Starting Version |
---|---|---|---|
id | Long | 0.6 | |
listenerUuid | String | 0.6 | |
vmNicUuid | String | The VM NIC UUID. | 0.6 |
status | String | 0.6 | |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
SDK Sample
Java
SDK
RemoveVmNicFromLoadBalancerAction action = new RemoveVmNicFromLoadBalancerAction();
action.vmNicUuids = asList("6d6c33021c0a432c9030046c3a24be6e");
action.listenerUuid = "0a11bad9fdb84538953689a5c4430126";
action.sessionId = "867ccf6fbe934fe19e8bb5ba861de7fd";
RemoveVmNicFromLoadBalancerAction.Result res = action.call();
Python
SDK
RemoveVmNicFromLoadBalancerAction action = RemoveVmNicFromLoadBalancerAction()
action.vmNicUuids = [ef9de345e68f4e6aa51164eff6ee5249]
action.listenerUuid = "04f42584e0a14afdb382e0961f057076"
action.sessionId = "46c7dabf668943faa1bb8b6be0d60397"
RemoveVmNicFromLoadBalancerAction.Result res = action.call()