接口说明
面向政企版租户开放创建规则接口 限流:根据租户实现用户级别的限流,限制为10次每秒
URL
POST https://ecloud.10086.cn/api/Computer_api/cem_openapi/ccacem/api/v1/ecloud-securityGroup/createRule
请求参数
Body
|
参数名称
|
类型
|
必填
|
描述
|
|
reqDto
|
CcempCreateRuleReqDto
|
是
|
reqDto |
|
securityGroupRuleList
|
<RuleCommonParam> array
|
否
|
|
|
direction
|
string
|
否
|
规则方向,ingress:入,egress:出 |
|
etherType
|
string
|
否
|
IP类型,IPv4 或 IPv6 |
|
maxPortRange
|
string
|
否
|
上行端口(协议为ANY和ICMP时填null,表示所有端口,TCP、UDP必填,与下行端口值相同时表示指定端口号) |
|
minPortRange
|
string
|
否
|
下行端口(协议为ANY和ICMP时填null,表示所有端口,TCP、UDP必填,与上行端口值相同时表示指定端口号) |
|
protocol
|
string
|
否
|
协议类型,TCP/UDP/ICMP/GRE/VRRP/IGMP/ANY |
|
remark
|
string
|
否
|
备注 |
|
remoteIpPrefix
|
string
|
否
|
授权对象 |
|
remoteType
|
string
|
否
|
填 cidr 或者 securityGroup, 当前写死为 cidr |
|
securityGroupUid
|
string
|
是
|
安全组UID |
请求示例
POST https://ecloud.10086.cn/api/Computer_api/cem_openapi/ccacem/api/v1/ecloud-securityGroup/createRule
{
"securityGroupUid":"sg-a98ef7e73c0d405aa3d53a9f3e80f2bc",
"securityGroupRuleList":[
{
"minPortRange":"25",
"maxPortRange":"25",
"direction":"ingress",
"etherType":"IPv4",
"protocol":"TCP",
"remoteIpPrefix":"10.10.10.12",
"remark":"备注1"
},
{
"minPortRange":"80",
"maxPortRange":"80",
"direction":"egress",
"etherType":"IPv4",
"protocol":"UDP",
"remoteIpPrefix":"10.10.10.13",
"remark":"备注2"
}
]
}
返回参数
返回码:200
OK
|
参数名称
|
类型
|
描述
|
|
body
|
string
|
|
|
errorCode
|
string
|
|
|
errorMessage
|
string
|
|
|
requestId
|
string
|
|
|
state
|
enum(OK,ERROR,EXCEPTION,FORBIDDEN,REMAINING,TIMEOUT)
|
返回示例
返回码:200
OK
{
"body":"ok",
"errorCode":"200",
"errorMessage":"",
"requestId":"5e70b7f7081ad5b3",
"state":"OK"
}