post
/v1/security-group-rulesCreate security group rule
Create a new security group rule
Request Body
requiredContent-Type: application/json
security_group_id
string<uuid>requireddirection
stringrequiredEnum: "ingress", "egress"
ethertype
stringoptionalEnum: "IPv4", "IPv6"
protocol
stringoptionalnullable
port_range_min
integeroptionalnullable
port_range_max
integeroptionalnullable
remote_ip_prefix
stringoptionalnullable
remote_group_id
string<uuid>optionalnullable
description
stringoptionalResponses
201
Security group rule created
Content-Type: application/json
security_group_rule
objectoptional400
Invalid request parameters
Content-Type: application/json
error
objectrequired401
Authentication required or token invalid
Content-Type: application/json
error
objectrequired404
Security group not found
Content-Type: application/json
error
objectrequired409
Rule already exists
Content-Type: application/json
error
objectrequired500
Internal server error
Content-Type: application/json
error
objectrequiredcurl -X POST "https://api.spo1.mycloud.com/v1/security-group-rules" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json" \-d '{"security_group_id": "550e8400-e29b-41d4-a716-446655440000","direction": "ingress","ethertype": "IPv4","protocol": "string","port_range_min": 1,"port_range_max": 1,"remote_ip_prefix": "string","remote_group_id": "550e8400-e29b-41d4-a716-446655440000","description": "string"}'