ApplyRuleSetChanges
API Request
URLs
PUT zstack/v1/vpcfirewalls/ruleSets/apply/{uuid}/actionsHeaders
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.
{
"applyRuleSetChanges": {},
"systemTags": [],
"userTags": []
}
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 PUT -d '{"applyRuleSetChanges":{}}' http://localhost:8080/zstack/v1/vpcfirewalls/ruleSets/apply/e78b0b5ebe1c33159b0faa2d88a41b21/actionsRequest Parameters
| Name | Type | Location | Description | Valid Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the action. | 4.0.0 | |
| systemTags | List | body | Optional. | 4.0.0 | |
| userTags | List | body | Optional. | 4.0.0 |
API Response
Sample Response
{
"inventory": {
"name": "name",
"actionType": "drop",
"description": "example-des",
"enableDefaultLog": false,
"isDefault": false,
"isApplied": true
}
}| 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.0.0 |
| inventory | VpcFirewallRuleSetInventory | See inventory | 4.0.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.0.0 |
| description | String | The brief description of the error. | 4.0.0 |
| details | String | The details about the error. | 4.0.0 |
| elaboration | String | The reserved field. Default value: null. | 4.0.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 4.0.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.0.0 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the VPC firewall ruleset. | 4.0.0 |
| name | String | The name of the VPC firewall ruleset. | 4.0.0 |
| description | String | The detailed description of the VPC firewall ruleset. | 4.0.0 |
| isDefault | boolean | 4.0.0 | |
| isApplied | boolean | 4.0.0 | |
| createDate | Timestamp | The time when the VPC firewall ruleset was created. | 4.0.0 |
| lastOpDate | Timestamp | The time when the VPC firewall ruleset was last modified. | 4.0.0 |
| actionType | ActionType | See actionType | 4.0.0 |
#actionType
| Name | Type | Description | Starting Version |
|---|---|---|---|
| drop | ActionType | 4.0.0 | |
| reject | ActionType | 4.0.0 | |
| accept | ActionType | 4.0.0 |
SDK Sample
Java
SDK
ApplyRuleSetChangesAction action = new ApplyRuleSetChangesAction();
action.uuid = "e78b0b5ebe1c33159b0faa2d88a41b21";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ApplyRuleSetChangesAction.Result res = action.call();Python
SDK
ApplyRuleSetChangesAction action = ApplyRuleSetChangesAction()
action.uuid = "e78b0b5ebe1c33159b0faa2d88a41b21"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
ApplyRuleSetChangesAction.Result res = action.call()