AddAccessControlListRedirectRule
API Request
URLs
            POST zstack/v1/access-control-lists/{aclUuid}/redirectRulesHeaders
            Authorization: OAuth the-session-uuidBody Note: In
                    the preceding sample, both systemTags and userTags are optional.
                    These two fields can be included in the body structure.
Note: In
                    the preceding sample, both systemTags and userTags are optional.
                    These two fields can be included in the body structure.
            {
  "params": {
    "name": "redirect-rule",
    "domain": "zstack.io",
    "url": "/cloud"
  },
  "systemTags": [],
  "userTags": []
} Note: In
                    the preceding sample, both systemTags and userTags are optional.
                    These two fields can be included in the body structure.
Note: In
                    the preceding sample, both systemTags and userTags are optional.
                    These two fields can be included in the body structure.Curl
                Sample
        curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"name":"redirect-rule","domain":"zstack.io","url":"/cloud"}}' http://localhost:8080/zstack/v1/access-control-lists/f1ca42b8901833fbac7cbd06e3b4d7cb/redirectRulesRequest Parameters
        | Name | Type | Location | Description | Optional Value | Starting Version | 
|---|---|---|---|---|---|
| name | String | body (contained in the params structure) | Optional. The resource name. | 4.1.0 | |
| description | String | body (contained in the params structure) | Optional. The detailed description of the resource. | 4.1.0 | |
| domain | String | body (contained in the params structure) | Optional. The domain name. | 4.1.0 | |
| url | String | body (contained in the params structure) | Optional. The URL. | 4.1.0 | |
| aclUuid | String | url | The UUID of the access control list. | 4.1.0 | |
| resourceUuid | String | body (contained in the params structure) | Optional. The resource UUID. | 4.1.0 | |
| tagUuids | List | body (contained in the params structure) | Optional. The tag UUID list. | 4.1.0 | |
| systemTags | List | body | Optional. The system tags. | 4.1.0 | |
| userTags | List | body | Optional. The user tags. | 4.1.0 | 
API Response
Sample
                Response
            {
  "inventory": {
    "aclUuid": "3e05577ffa823e759d67e112aa7e5f80",
    "ipEntries": "192.168.48.0/24"
  }
}| Name | Type | Description | Starting Version | 
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 4.1.0 | 
| inventory | AccessControlListEntryInventory | See inventory. | 4.1.0 | 
#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. | 4.1.0 | 
| description | String | The brief description of the error. | 4.1.0 | 
| details | String | The details about the error. | 4.1.0 | 
| elaboration | String | The reserved field. Default value: null. | 4.1.0 | 
| opaque | LinkedHashMap | The reserved field. Default value: null. | 4.1.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. | 4.1.0 | 
#inventory
        | Name | Type | Description | Starting Version | 
|---|---|---|---|
| uuid | String | The resource UUID. | 4.1.0 | 
| aclUuid | String | 4.1.0 | |
| type | String | 4.1.0 | |
| name | String | The resource name. | 4.1.0 | 
| domain | String | 4.1.0 | |
| url | String | 4.1.0 | |
| ipEntries | String | 4.1.0 | |
| description | String | The detailed description of the resource. | 4.1.0 | 
| createDate | Timestamp | The creation date. | 4.1.0 | 
| lastOpDate | Timestamp | The last operation date. | 4.1.0 | 
SDK Sample
Java
                SDK
            AddAccessControlListRedirectRuleAction action = new AddAccessControlListRedirectRuleAction();
action.name = "redirect-rule";
action.domain = "zstack.io";
action.url = "/cloud";
action.aclUuid = "f1ca42b8901833fbac7cbd06e3b4d7cb";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddAccessControlListRedirectRuleAction.Result res = action.call();Python
                SDK
        AddAccessControlListRedirectRuleAction action = AddAccessControlListRedirectRuleAction()
action.name = "redirect-rule"
action.domain = "zstack.io"
action.url = "/cloud"
action.aclUuid = "f1ca42b8901833fbac7cbd06e3b4d7cb"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddAccessControlListRedirectRuleAction.Result res = action.call()