接口说明
面向政企版租户开放创建安全组接口 限流:根据租户实现用户级别的限流,限制为10次每秒
URL
POST https://ecloud.10086.cn/api/Computer_api/cem_openapi/ccacem/api/v1/ecloud-securityGroup/createSecurityGroup
请求参数
Body
|
参数名称
|
类型
|
必填
|
描述
|
|
reqDto
|
CcempCreateSecurityGroupReqDto
|
是
|
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 |
|
securityGroupName
|
string
|
是
|
安全组名称 |
|
description
|
string
|
否
|
安全组描述 |
|
poolCode
|
string
|
是
|
资源池编码 |
|
region
|
string
|
是
|
可用区编码, 例如:CIDC-RP-30-AZ1 |
请求示例
POST https://ecloud.10086.cn/api/Computer_api/cem_openapi/ccacem/api/v1/ecloud-securityGroup/createSecurityGroup
{
"securityGroupName":"secGroup2",
"poolCode":"CIDC-RP-25",
"region":"CIDC-RP-25-AZ2",
"description":"",
"securityGroupRuleList":[
{
"minPortRange":"80",
"maxPortRange":"80",
"direction":"ingress",
"etherType":"IPv4",
"protocol":"TCP",
"remoteIpPrefix":"10.10.10.10",
"remark":"测试"
},
{
"minPortRange":"80",
"maxPortRange":"80",
"direction":"egress",
"etherType":"IPv4",
"protocol":"UDP",
"remoteIpPrefix":"10.10.10.11",
"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":"b8eed38b52b93de7",
"state":"OK"
}