POST zstack/v1/policy-routes/rulesets
Authorization: OAuth the-session-uuid
{ "params": { "name": "ruleSet", "description": "description", "vRouterUuid": "85eb5d9f50bc3919b793b3caf9f3e859" }, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X POST -d '{"params":{"name":"ruleSet","description":"description","vRouterUuid":"85eb5d9f50bc3919b793b3caf9f3e859"}}' http://localhost:8080/zstack/v1/policy-routes/rulesets
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
name | String | body (contained in the params structure) | The resource name. | 3.6.0 | |
description | String | body (contained in the params structure) | Optional. The detailed description of the resource. | 3.6.0 | |
vRouterUuid | String | body (contained in the params structure) | The vRouter UUID. | 3.6.0 | |
type | String | body (contained in the params structure) | Optional. The type. |
| 3.9.0 |
resourceUuid | String | body (contained in the params structure) | Optional. The resource UUID. | 3.6.0 | |
tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 3.6.0 | |
systemTags | List | body | Optional. The system tags. | 3.6.0 | |
userTags | List | body | Optional. The user tags. | 3.6.0 |
{ "inventory": { "name": "name", "description": "example-des", "rules": [ { "uuid": "74cc4fed46f633f2a618b0e06d122377", "ruleNumber": 1.0, "ruleSetUuid": "00693e31fa3b3e3fba017ed714c02cdf", "tableUuid": "b273e0c273c03559872efa272194492c", "destIp": "192.168.1.1", "sourceIp": "10.0.0.1", "destPort": "22", "sourcePort": "80", "protocol": "tcp", "state": "enable" } ] } }
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.6.0 |
inventory | PolicyRouteRuleSetInventory | See inventory. | 3.6.0 |
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.6.0 |
description | String | The brief description of the error. | 3.6.0 |
details | String | The details about the error. | 3.6.0 |
elaboration | String | The reserved field. Default value: null. | 3.6.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 3.6.0 |
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.6.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.6.0 |
name | String | The resource name. | 3.6.0 |
description | String | The detailed description of the resource. | 3.6.0 |
type | String | 3.9.0 | |
createDate | Timestamp | The creation date. | 3.6.0 |
lastOpDate | Timestamp | The last operation date. | 3.6.0 |
rules | List | See rules | 3.6.0 |
l3Refs | List | See l3Refs. | 3.9.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.6.0 |
ruleNumber | int | The priority. | 3.6.0 |
ruleSetUuid | String | The UUID of the policy route rule set. | 3.6.0 |
tableUuid | String | The policy route table UUID. | 3.6.0 |
destIp | String | The destination IP address. | 3.6.0 |
sourceIp | String | The source IP address. | 3.6.0 |
destPort | String | The destination port. | 3.6.0 |
sourcePort | String | The source port. | 3.6.0 |
createDate | Timestamp | The creation date. | 3.6.0 |
lastOpDate | Timestamp | The last operation date. | 3.6.0 |
protocol | PolicyRouteRuleProtocol | See protocol. | 3.6.0 |
state | PolicyRouteRuleState | See state. | 3.6.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
tcp | PolicyRouteRuleProtocol | 3.6.0 | |
udp | PolicyRouteRuleProtocol | 3.6.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
enable | PolicyRouteRuleState | 3.6.0 | |
disable | PolicyRouteRuleState | 3.6.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
id | long | 3.9.0 | |
l3NetworkUuid | String | The L3 network UUID. | 3.9.0 |
ruleSetUuid | String | 3.9.0 | |
createDate | Timestamp | The creation date. | 3.9.0 |
lastOpDate | Timestamp | The last operation date. | 3.9.0 |
CreatePolicyRouteRuleSetAction action = new CreatePolicyRouteRuleSetAction(); action.name = "ruleSet"; action.description = "description"; action.vRouterUuid = "85eb5d9f50bc3919b793b3caf9f3e859"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; CreatePolicyRouteRuleSetAction.Result res = action.call();
CreatePolicyRouteRuleSetAction action = CreatePolicyRouteRuleSetAction() action.name = "ruleSet" action.description = "description" action.vRouterUuid = "85eb5d9f50bc3919b793b3caf9f3e859" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" CreatePolicyRouteRuleSetAction.Result res = action.call()
DELETE zstack/v1/policy-routes/ruleSets/{uuid}?deleteMode={deleteMode}
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/policy-routes/ruleSets/f430004bc0ed315c89eb7909a48d27e7?deleteMode=Permissive
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The resource UUID. | 3.6.0 | |
deleteMode | String | body | Optional. The delete mode. | 3.6.0 | |
systemTags | List | body | Optional. The system tags. | 3.6.0 | |
userTags | List | body | Optional. The user tags. | 3.6.0 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
DeletePolicyRouteRuleSetAction action = new DeletePolicyRouteRuleSetAction(); action.uuid = "f430004bc0ed315c89eb7909a48d27e7"; action.deleteMode = "Permissive"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; DeletePolicyRouteRuleSetAction.Result res = action.call();
DeletePolicyRouteRuleSetAction action = DeletePolicyRouteRuleSetAction() action.uuid = "f430004bc0ed315c89eb7909a48d27e7" action.deleteMode = "Permissive" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" DeletePolicyRouteRuleSetAction.Result res = action.call()
PUT zstack/v1/policy-routes/ruleSets/{uuid}/actions
Authorization: OAuth the-session-uuid
{ "updatePolicyRouteRuleSet": { "name": "name", "description": "desc" }, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X PUT -d '{"updatePolicyRouteRuleSet":{"name":"name","description":"desc"}}' http://localhost:8080/zstack/v1/policy-routes/ruleSets/e58212f4cd0c3f2f96d27dde19de1383/actions
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The resource UUID. | 3.6.0 | |
name | String | body (contained in the updatePolicyRouteRuleSet structure) | Optional. The resource name. | 3.6.0 | |
description | String | body (contained in the updatePolicyRouteRuleSet structure) | Optional. The detailed description of the resource. | 3.6.0 | |
systemTags | List | body | Optional. The system tags. | 3.6.0 | |
userTags | List | body | Optional. The user tags. | 3.6.0 |
{ "inventory": { "name": "name", "description": "example-des", "rules": [] } }
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.6.0 |
inventory | PolicyRouteRuleSetInventory | See inventory. | 3.6.0 |
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.6.0 |
description | String | The brief description of the error. | 3.6.0 |
details | String | The details about the error. | 3.6.0 |
elaboration | String | The reserved field. Default value: null. | 3.6.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 3.6.0 |
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.6.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.6.0 |
name | String | The resource name. | 3.6.0 |
description | String | The detailed description of the resource. | 3.6.0 |
createDate | Timestamp | The creation date. | 3.6.0 |
lastOpDate | Timestamp | The last operation date. | 3.6.0 |
rules | List | See rules. | 3.6.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 3.6.0 |
ruleNumber | int | The priority. | 3.6.0 |
ruleSetUuid | String | The UUID of the policy route rule set. | 3.6.0 |
tableUuid | String | The policy route table UUID. | 3.6.0 |
destIp | String | The destination IP address. | 3.6.0 |
sourceIp | String | The source IP address. | 3.6.0 |
destPort | String | The destination port. | 3.6.0 |
sourcePort | String | The source port. | 3.6.0 |
createDate | Timestamp | The creation date. | 3.6.0 |
lastOpDate | Timestamp | The last operation date. | 3.6.0 |
protocol | PolicyRouteRuleProtocol | See protocol. | 3.6.0 |
state | PolicyRouteRuleState | See state. | 3.6.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
tcp | PolicyRouteRuleProtocol | 3.6.0 | |
udp | PolicyRouteRuleProtocol | 3.6.0 |
Name | Type | Description | Starting Version |
---|---|---|---|
enable | PolicyRouteRuleState | 3.6.0 | |
disable | PolicyRouteRuleState | 3.6.0 |
UpdatePolicyRouteRuleSetAction action = new UpdatePolicyRouteRuleSetAction(); action.uuid = "e58212f4cd0c3f2f96d27dde19de1383"; action.name = "name"; action.description = "desc"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; UpdatePolicyRouteRuleSetAction.Result res = action.call();
UpdatePolicyRouteRuleSetAction action = UpdatePolicyRouteRuleSetAction() action.uuid = "e58212f4cd0c3f2f96d27dde19de1383" action.name = "name" action.description = "desc" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" UpdatePolicyRouteRuleSetAction.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.