Body
Required
-
Network flow direction to match
Values are
ingressoregress. -
Security Group rule description
Maximum length is
255. -
CIDR-formatted network allowed
-
Security Group
-
Network protocol
Values are
tcp,esp,icmp,udp,gre,ah,ipip, oricmpv6. -
ICMP details (default: -1 (ANY))
-
Start port of the range
Minimum value is
1, maximum value is65535. -
End port of the range
Minimum value is
1, maximum value is65535.
POST
/security-group/{id}/rules
curl \
--request POST 'https://api-ch-gva-2.exoscale.com/v2/security-group/{id}/rules' \
--header "Content-Type: application/json" \
--data '{"flow-direction":"ingress","description":"string","network":"string","security-group":{"name":"string","visibility":"private"},"protocol":"tcp","icmp":{"code":42,"type":42},"start-port":42,"end-port":42}'
Request examples
{
"flow-direction": "ingress",
"description": "string",
"network": "string",
"security-group": {
"name": "string",
"visibility": "private"
},
"protocol": "tcp",
"icmp": {
"code": 42,
"type": 42
},
"start-port": 42,
"end-port": 42
}
Response examples (200)
{
"id": "string",
"reason": "incorrect",
"reference": {
"id": "string",
"link": "string",
"command": "string"
},
"message": "string",
"state": "failure"
}