v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-151,1412,2144.5 MB
Security Groups

Create security group rule

Add a new rule to an existing security group. Returns a task ID for tracking the asynchronous operation.

post/cloud/v2/security_groups/{project_id}/{region_id}/{group_id}/rules

Path parameters

project_idinteger required

Project ID

Example:1

Project ID

region_idinteger required

Region ID

Example:1

Region ID

group_idstring uuid4 required

Security group ID

Example:00000000-0000-4000-8000-000000000000

Security group ID

Request body

descriptionstring

Rule description

direction'egress' | 'ingress' required

Ingress or egress, which is the direction in which the security group is applied

ethertype'IPv4' | 'IPv6'

Ether type

port_range_maxinteger nullable

The maximum port number in the range that is matched by the security group rule

port_range_mininteger nullable

The minimum port number in the range that is matched by the security group rule

protocol'ah' | 'dccp' | 'egp' | 'esp' | 'gre' | 'icmp' | 'igmp' | 'ipencap' | 'ipip' | 'ipv6-encap' | 'ipv6-frag' | 'ipv6-icmp' | 'ipv6-nonxt' | 'ipv6-opts' | 'ipv6-route' | 'ospf' | 'pgm' | 'rsvp' | 'sctp' | 'tcp' | 'udp' | 'udplite' | 'vrrp'

V2 protocol enum without 'any'. Use null for all protocols instead.

remote_group_idstring uuid4

The remote group UUID to associate with this security group

remote_ip_prefixstring ipvanynetwork nullable

The remote IP prefix that is matched by this security group rule

Example request

{
  "description": "Some description",
  "direction": "ingress",
  "ethertype": "IPv4",
  "port_range_max": 80,
  "port_range_min": 80,
  "remote_group_id": "00000000-0000-4000-8000-000000000000",
  "remote_ip_prefix": "10.0.0.0/8"
}

Response

OK

tasksstring[] required

List of task IDs representing asynchronous operations. Use these IDs to monitor operation progress:

  • GET /v1/tasks/{task_id} - Check individual task status and details Poll task status until completion (FINISHED/ERROR) before proceeding with dependent operations.
idstring required

Example response

{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}