PUT zstack/v1/vpcfirewalls/rules/{uuid}/actionsAuthorization: OAuth the-session-uuid{
"updateFirewallRule": {
"vpcFirewallUuid": "181da73e752432b283d3096bb29afb59",
"ruleSetUuid": "cb6db506c523354282aecf56acd4b78d",
"action": "accept",
"protocol": "tcp",
"destPort": "22",
"sourcePort": "22",
"sourceIp": "192.168.1.2",
"destIp": "192.168.1.1",
"allowStates": "invalid,new",
"tcpFlag": "SYN",
"icmpTypeName": "echo-reply",
"ruleNumber": 1001.0,
"enableLog": false,
"state": "disable",
"description": "example rule des"
},
"systemTags": [],
"userTags": []
}curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateFirewallRule":{"vpcFirewallUuid":"181da73e752432b283d3096bb29afb59","ruleSetUuid":"cb6db506c523354282aecf56acd4b78d","action":"accept","protocol":"tcp","destPort":"22","sourcePort":"22","sourceIp":"192.168.1.2","destIp":"192.168.1.1","allowStates":"invalid,new","tcpFlag":"SYN","icmpTypeName":"echo-reply","ruleNumber":1001.0,"enableLog":false,"state":"disable","description":"example rule des"}}' http://localhost:8080/zstack/v1/vpcfirewalls/rules/7e9bd2ad1f48320d8782d737b262abb1/actions| 名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
|---|---|---|---|---|---|
| vpcFirewallUuid | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| ruleSetUuid | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| uuid | String | url | 资源的UUID,唯一标示该资源 | 3.6.0 | |
| action | String | body(包含在updateFirewallRule结构中) |
| 3.6.0 | |
| protocol (可选) | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| destPort (可选) | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| sourcePort (可选) | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| sourceIp (可选) | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| destIp (可选) | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| allowStates (可选) | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| tcpFlag (可选) | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| icmpTypeName (可选) | String | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| ruleNumber | Integer | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| enableLog (可选) | boolean | body(包含在updateFirewallRule结构中) | 3.6.0 | ||
| state | String | body(包含在updateFirewallRule结构中) |
| 3.6.0 | |
| description (可选) | String | body(包含在updateFirewallRule结构中) | 资源的详细描述 | 3.6.0 | |
| systemTags (可选) | List | body | 3.6.0 | ||
| userTags (可选) | List | body | 3.6.0 |
{
"inventory": {
"vpcFirewallUuid": "07a45d49ddfb3be1b0b36a0022d69598",
"ruleSetUuid": "ff7b94bb9f0432a4a2e411a187138ba0",
"action": "accept",
"protocol": "TCP",
"destPort": "22",
"sourcePort": "22",
"sourceIp": "192.168.1.2",
"destIp": "192.168.1.1",
"ruleNumber": 1001.0,
"allowStates": "invalid,new",
"tcpFlag": "SYN",
"icmpTypeName": "echo-reply",
"enableLog": false,
"state": "disable",
"isDefault": false,
"description": "example rule des"
}
}| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 3.6.0 |
| inventory | VpcFirewallRuleInventory | 详情参考inventory | 3.6.0 |
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 3.6.0 |
| description | String | 错误的概要描述 | 3.6.0 |
| details | String | 错误的详细信息 | 3.6.0 |
| elaboration | String | 保留字段,默认为null | 3.6.0 |
| opaque | LinkedHashMap | 保留字段,默认为null | 3.6.0 |
| cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 3.6.0 |
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 3.6.0 |
| vpcFirewallUuid | String | 3.6.0 | |
| ruleSetUuid | String | 3.6.0 | |
| ruleSetName | String | 3.6.0 | |
| destPort | String | 3.6.0 | |
| sourcePort | String | 3.6.0 | |
| sourceIp | String | 3.6.0 | |
| destIp | String | 3.6.0 | |
| ruleNumber | Integer | 3.6.0 | |
| allowStates | String | 3.6.0 | |
| tcpFlag | String | 3.6.0 | |
| icmpTypeName | String | 3.6.0 | |
| isDefault | boolean | 3.6.0 | |
| description | String | 资源的详细描述 | 3.6.0 |
| createDate | Timestamp | 创建时间 | 3.6.0 |
| lastOpDate | Timestamp | 最后一次修改时间 | 3.6.0 |
| action | ActionType | 详情参考action | 3.6.0 |
| protocol | ProtocolType | 详情参考protocol | 3.6.0 |
| state | FirewallRuleState | 详情参考state | 3.6.0 |
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| drop | ActionType | 3.6.0 | |
| reject | ActionType | 3.6.0 | |
| accept | ActionType | 3.6.0 |
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| tcp_udp | ProtocolType | 3.6.0 | |
| all | ProtocolType | 3.6.0 | |
| ah | ProtocolType | 3.6.0 | |
| ax.25 | ProtocolType | 3.6.0 | |
| dccp | ProtocolType | 3.6.0 | |
| ddp | ProtocolType | 3.6.0 | |
| egp | ProtocolType | 3.6.0 | |
| eigrp | ProtocolType | 3.6.0 | |
| encap | ProtocolType | 3.6.0 | |
| esp | ProtocolType | 3.6.0 | |
| etherip | ProtocolType | 3.6.0 | |
| fc | ProtocolType | 3.6.0 | |
| ggp | ProtocolType | 3.6.0 | |
| gre | ProtocolType | 3.6.0 | |
| hip | ProtocolType | 3.6.0 | |
| hmp | ProtocolType | 3.6.0 | |
| icmp | ProtocolType | 3.6.0 | |
| ipdr-cmtp | ProtocolType | 3.6.0 | |
| idpr | ProtocolType | 3.6.0 | |
| igmp | ProtocolType | 3.6.0 | |
| igp | ProtocolType | 3.6.0 | |
| ip | ProtocolType | 3.6.0 | |
| ipcomp | ProtocolType | 3.6.0 | |
| ipencap | ProtocolType | 3.6.0 | |
| ipip | ProtocolType | 3.6.0 | |
| isis | ProtocolType | 3.6.0 | |
| iso-tp4 | ProtocolType | 3.6.0 | |
| l2tp | ProtocolType | 3.6.0 | |
| manet | ProtocolType | 3.6.0 | |
| mpls-in-ip | ProtocolType | 3.6.0 | |
| ospf | ProtocolType | 3.6.0 | |
| pim | ProtocolType | 3.6.0 | |
| pup | ProtocolType | 3.6.0 | |
| rdp | ProtocolType | 3.6.0 | |
| rohc | ProtocolType | 3.6.0 | |
| rspf | ProtocolType | 3.6.0 | |
| rsvp | ProtocolType | 3.6.0 | |
| sctp | ProtocolType | 3.6.0 | |
| skip | ProtocolType | 3.6.0 | |
| st | ProtocolType | 3.6.0 | |
| tcp | ProtocolType | 3.6.0 | |
| udp | ProtocolType | 3.6.0 | |
| udplite | ProtocolType | 3.6.0 | |
| vmtp | ProtocolType | 3.6.0 | |
| vrrp | ProtocolType | 3.6.0 | |
| wesp | ProtocolType | 3.6.0 | |
| xns-idp | ProtocolType | 3.6.0 | |
| xtp | ProtocolType | 3.6.0 |
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| disable | FirewallRuleState | 3.6.0 | |
| enable | FirewallRuleState | 3.6.0 |
UpdateFirewallRuleAction action = new UpdateFirewallRuleAction();
action.vpcFirewallUuid = "181da73e752432b283d3096bb29afb59";
action.ruleSetUuid = "cb6db506c523354282aecf56acd4b78d";
action.uuid = "7e9bd2ad1f48320d8782d737b262abb1";
action.action = "accept";
action.protocol = "tcp";
action.destPort = "22";
action.sourcePort = "22";
action.sourceIp = "192.168.1.2";
action.destIp = "192.168.1.1";
action.allowStates = "invalid,new";
action.tcpFlag = "SYN";
action.icmpTypeName = "echo-reply";
action.ruleNumber = 1001.0;
action.enableLog = false;
action.state = "disable";
action.description = "example rule des";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateFirewallRuleAction.Result res = action.call();UpdateFirewallRuleAction action = UpdateFirewallRuleAction()
action.vpcFirewallUuid = "181da73e752432b283d3096bb29afb59"
action.ruleSetUuid = "cb6db506c523354282aecf56acd4b78d"
action.uuid = "7e9bd2ad1f48320d8782d737b262abb1"
action.action = "accept"
action.protocol = "tcp"
action.destPort = "22"
action.sourcePort = "22"
action.sourceIp = "192.168.1.2"
action.destIp = "192.168.1.1"
action.allowStates = "invalid,new"
action.tcpFlag = "SYN"
action.icmpTypeName = "echo-reply"
action.ruleNumber = 1001.0
action.enableLog = false
action.state = "disable"
action.description = "example rule des"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateFirewallRuleAction.Result res = action.call()学习路径
ZStack Cloud 产品学习路径
快速梳理文档,点击相应文本链接,快速跳转到相应文档的页面,学习 ZStack Cloud 产品。
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io下载链接已发送至您的邮箱。
如未收到,请查看您的垃圾邮件、订阅邮件、广告邮件。 当您收到电子邮件后,请点击 URL 链接,以完成下载。感谢您使用 ZStack 产品和服务。
成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。
立即体验
联系我们
回到顶部
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。