v32

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

Add security group rule

Add a new rule to an existing security group.

Deprecated Use /v2/security_groups/<project_id>/<region_id>/<group_id>/rules instead.

post/cloud/v1/securitygroups/{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

Group ID

Example:024a29e9-b4b7-4c91-9a46-505be123d9f8

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' | 'any' | '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'
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

created_atstring date-time required

Datetime when the rule was created

descriptionstring nullable required

Rule description

direction'egress' | 'ingress' required

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

ethertype'IPv4' | 'IPv6' nullable required

Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.

idstring uuid4 required

The ID of the security group rule

port_range_maxinteger nullable required

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

port_range_mininteger nullable required

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

protocol'ah' | 'any' | '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' required
remote_group_idstring uuid4 nullable required

The remote group UUID to associate with this security group rule

remote_ip_prefixstring ipvanynetwork nullable required

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

revision_numberinteger required

The revision number of the resource

security_group_idstring uuid4 required

The security group ID to associate with this security group rule

updated_atstring date-time required

Datetime when the rule was last updated

Example response

{
  "created_at": "2019-06-18T11:56:16+0000",
  "description": "Some description",
  "ethertype": "IPv4",
  "id": "00000000-0000-4000-8000-000000000000",
  "port_range_max": 80,
  "port_range_min": 80,
  "remote_ip_prefix": "10.0.0.0/8",
  "security_group_id": "00000000-0000-4000-8000-000000000000",
  "updated_at": "2019-06-18T11:57:00+0000"
}