硅云幫助文檔中心
搜索文檔
熱門搜索詞:
產(chǎn)品簡介
產(chǎn)品定價
入門指南
經(jīng)典案例
快照
常見問題
知識拓展
名詞解釋
API參考
產(chǎn)品規(guī)格相關(guān)接口
服務(wù)器實例相關(guān)接口
安全組相關(guān)接口
磁盤相關(guān)接口
創(chuàng)建安全組規(guī)則
創(chuàng)建安全組規(guī)則
/ncs-server/api/v1/security/groupRule
POST
字段 | 類型 | 最大長度 | 參數(shù)位置 | 默認選填 | 描述 |
groupId | string | 32 | RequestBody | 安全組id | |
ipInfo | string | 32 | RequestBody | ipv4Cidr | |
direction | string | 16 | RequestBody | 方向,ingress egress出口 | |
ethertype | string | 16 | RequestBody | 目前固定傳IPv4 | |
protocol | string | 16 | RequestBody | 協(xié)議,tcp,udp,icmp,gre | |
minPort | int | 10 | RequestBody | 選填 | 0 到65535,minPort應(yīng)該小于等于maxPort,根據(jù)協(xié)議判斷是否需要填 ,tcp udp需要填,gre,icmp不需要 |
macPort | int | 10 | RequestBody | 選填 | 0 到65535,根據(jù)協(xié)議判斷是否需要填,tcp udp需要填,gre,icmp不需要 |
POST /ncs-server/api/v1/security/groupRule HTTP/1.1 Content-Type: application/json request_id: 2942183558593ffc9d75fb8e16793ff api_key: 1706006863049654272 signature: 3b289b8f32e3e0b99720ad556ae3d67e74dd5b29888ebb332bb315e279cdd3ef Content-Type: application/json { "groupId": "sg-3h63zui26a222", "ipInfo": "192.168.0.0/16", "direction": "ingress", "ethertype": "IPv4", "protocol": "tcp", "minPort": 80, "maxPort": 80 }
{ "status": 2000, "message": "success", "data": { "userAccount": "z8z87878", "remoteId": "df1d74c1-8ab2-40f3-837f-58287b10958f", "groupId": "sg-3h63zui26a222", "remoteGroupeId": "6f6013bf-989c-4a8c-b7a5-c50a01d6849e", "ruleType": "self", "ipInfo": "192.168.0.0/16", "direction": "ingress", "ethertype": "IPv4", "protocol": "tcp", "minPort": 80, "maxPort": 80, "id": "1706469912063246336" } }
實例數(shù)據(jù)結(jié)構(gòu):
字段 | 類型 | 描述 |
id | string | 安全組規(guī)則id |
userAccount | string | 用戶名 |
groupId | string | 安全組id |
ipInfo | string | ip cidr |
direction | string | 協(xié)議方向 |
ethertyp | string | 以太網(wǎng)類型 IPv4 |
protocol | string | 協(xié)議 |
minPort | int | 端口左區(qū)間,沒有不返回 |
maxPort | int | 端口右區(qū)間,沒有不返回 |
createTime | long | 創(chuàng)建時間時間戳,精確到毫秒 |
您對該文檔有什么建議?
本文導(dǎo)航