POST zstack/v1/login-control/access-control/rules
Authorization: OAuth the-session-uuid
{ "params": { "name": "rule1", "description": "this is a rule", "rule": "172.20.1.1,172.20.1.2", "controlStrategy": "ACCEPT" }, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X POST -d '{"params":{"name":"rule1","description":"this is a rule","rule":"172.20.1.1,172.20.1.2","controlStrategy":"ACCEPT"}}' http://localhost:8080/zstack/v1/login-control/access-control/rules
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
name | String | body (contained in the params structure) | The resource UUID. | 3.5.1 | |
description | String | body (contained in the params structure) | Optional. The detailed description of the resource. | 3.5.1 | |
rule | String | body (contained in the params structure) | 3.5.1 | ||
controlStrategy | String | body (contained in the params structure) | 3.5.1 | ||
resourceUuid | String | body (contained in the params structure) | Optional. | 3.5.1 | |
tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 3.5.1 | |
systemTags | List | body | Optional. | 3.5.1 | |
userTags | List | body | Optional. | 3.5.1 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
AddAccessControlRuleAction action = new AddAccessControlRuleAction(); action.name = "rule1"; action.description = "this is a rule"; action.rule = "172.20.1.1,172.20.1.2"; action.controlStrategy = "ACCEPT"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; AddAccessControlRuleAction.Result res = action.call();
AddAccessControlRuleAction action = AddAccessControlRuleAction() action.name = "rule1" action.description = "this is a rule" action.rule = "172.20.1.1,172.20.1.2" action.controlStrategy = "ACCEPT" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" AddAccessControlRuleAction.Result res = action.call()
DELETE zstack/v1/login-control/access-control/rules/{uuid}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X DELETE http://localhost:8080/zstack/v1/login-control/access-control/rules/04baa07ba917360394ec649e26b93593?
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The resource UUID. | 3.5.1 | |
deleteMode | String | body | Optional. | 3.5.1 | |
systemTags | List | body | Optional. | 3.5.1 | |
userTags | List | body | Optional. | 3.5.1 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
DeleteAccessControlRuleAction action = new DeleteAccessControlRuleAction(); action.uuid = "04baa07ba917360394ec649e26b93593"; action.deleteMode = "Permissive"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; DeleteAccessControlRuleAction.Result res = action.call();
DeleteAccessControlRuleAction action = DeleteAccessControlRuleAction() action.uuid = "04baa07ba917360394ec649e26b93593" action.deleteMode = "Permissive" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" DeleteAccessControlRuleAction.Result res = action.call()
PUT zstack/v1/login-control/access-control/rules/{uuid}/actions
Authorization: OAuth the-session-uuid
{ "updateAccessControlRule": { "name": "rule1", "description": "this is a rule" }, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X PUT -d '{"updateAccessControlRule":{"name":"rule1","description":"this is a rule"}}' http://localhost:8080/zstack/v1/login-control/access-control/rules/6bc3181222854438ac8af53f2b57ecf7/actions
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The resource UUID. | 3.5.1 | |
name | String | body (contained in the updateAccessControlRule structure) | Optional. The resource name. | 3.5.1 | |
description | String | body (contained in the updateAccessControlRule structure) | Optional. The detailed description of the resource. | 3.5.1 | |
systemTags | List | body | Optional. | 3.5.1 | |
userTags | List | body | Optional. | 3.5.1 |
{ "inventory": { "name": "rule", "description": "this is rule description", "rule": "172.20.1.1", "strategy": "ACCEPT", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } }
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 3.5.1 |
inventory | AccessControlRuleInventory | See inventory. | 3.5.1 |
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. | 3.5.1 |
description | String | The brief description of the error. | 3.5.1 |
details | String | The details about the error. | 3.5.1 |
elaboration | String | The reserved field. Default value: null. | 3.5.1 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 3.5.1 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 3.5.1 |
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.5.1 |
name | String | The resource name. | 3.5.1 |
description | String | The detailed description of the resource. | 3.5.1 |
rule | String | 3.5.1 | |
createDate | Timestamp | The creation date. | 3.5.1 |
lastOpDate | Timestamp | The last operation date. | 3.5.1 |
strategy | ControlStrategy | See strategy. | 3.5.1 |
Name | Type | Description | Starting Version |
---|---|---|---|
ACCEPT | ControlStrategy | 3.5.1 | |
REJECT | ControlStrategy | 3.5.1 |
UpdateAccessControlRuleAction action = new UpdateAccessControlRuleAction(); action.uuid = "c3fb6843d7b84791bbffb762e35b3065"; action.name = "rule1"; action.description = "this is a rule"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; UpdateAccessControlRuleAction.Result res = action.call();
UpdateAccessControlRuleAction action = UpdateAccessControlRuleAction() action.uuid = "4c30b1ea5adf450ebca75f8b8606b964" action.name = "rule1" action.description = "this is a rule" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" UpdateAccessControlRuleAction.Result res = action.call()
Back to Top
Email Us
contact@zstack.ioEmail Us
contact@zstack.ioEmail Us
contact@zstack.ioThe download link is sent to your email address.
If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.Thank you for using ZStack products and services.
Submit successfully.
We'll connect soon.Thank you for using ZStack products and services.