AddAccessControlListToLoadBalancer
API Request
URLs
POST zstack/v1/load-balancers/listeners/{listenerUuid}/access-control-lists
Headers
Authorization: OAuth the-session-uuid
Body
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"aclUuids": [
"25e10ecdb6d63b598899c1103d2cdf46"
],
"aclType": "black"
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"aclUuids":["25e10ecdb6d63b598899c1103d2cdf46"],"aclType":"black"}}' http://localhost:8080/zstack/v1/load-balancers/listeners/19c1a4dcaea637da86e3ecbb6a3a5f6e/access-control-lists
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
aclUuids | List | body (contained in the params structure) | The UUID of the access control list. | 3.9.0 | |
aclType | String | body (contained in the params structure) | The access control type. |
|
3.9.0 |
listenerUuid | String | url | The listener UUID. | 3.9.0 | |
serverGroupUuids | List | body | Optional. The UUID of the load balancer server group. | 4.1.0 | |
systemTags | List | body | Optional. The system tags. | 3.9.0 | |
userTags | List | body | Optional. The user tags. | 3.9.0 |
API Response
When the API succeeded, an empty JSON structure
{}
is returned. When
the API failed, the returned JSON structure includes an error field. For
example,{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}
SDK Sample
Java
SDK
AddAccessControlListToLoadBalancerAction action = new AddAccessControlListToLoadBalancerAction();
action.aclUuids = asList("25e10ecdb6d63b598899c1103d2cdf46");
action.aclType = "black";
action.listenerUuid = "19c1a4dcaea637da86e3ecbb6a3a5f6e";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddAccessControlListToLoadBalancerAction.Result res = action.call();
Python
SDK
AddAccessControlListToLoadBalancerAction action = AddAccessControlListToLoadBalancerAction()
action.aclUuids = [25e10ecdb6d63b598899c1103d2cdf46]
action.aclType = "black"
action.listenerUuid = "19c1a4dcaea637da86e3ecbb6a3a5f6e"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddAccessControlListToLoadBalancerAction.Result res = action.call()