ByCloud Docs
GuidesCLIAPISDK
post/v1/security-group-rules

Create security group rule

Create a new security group rule

Request Body

required

Content-Type: application/json

security_group_id

string<uuid>required

direction

stringrequired

Enum: "ingress", "egress"

ethertype

stringoptional

Enum: "IPv4", "IPv6"

protocol

stringoptional

nullable

port_range_min

integeroptional

nullable

port_range_max

integeroptional

nullable

remote_ip_prefix

stringoptional

nullable

remote_group_id

string<uuid>optional

nullable

description

stringoptional

Responses

201

Security group rule created

Content-Type: application/json

security_group_rule

objectoptional
400

Invalid request parameters

Content-Type: application/json

error

objectrequired
401

Authentication required or token invalid

Content-Type: application/json

error

objectrequired
404

Security group not found

Content-Type: application/json

error

objectrequired
409

Rule already exists

Content-Type: application/json

error

objectrequired
500

Internal server error

Content-Type: application/json

error

objectrequired
curl -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"
}'