Create security group rule

 
MethodURIDescription
POSTv2.0/security-group-rules

Creates an OpenStack Networking security group rule.

Normal response codes: 201

Error response codes: badRequest (400), unauthorized (401), itemNotFound (404), buildInProgress (409)

 Request

 

Example 4.52. Create security group rule Request: JSON

POST /v2.0/security-group-rules.json
Accept: application/json
{
   "security_group_rule":{
      "direction":"ingress",
      "port_range_min":"80",
      "ethertype":"IPv4",
      "port_range_max":"80",
      "protocol":"tcp",
      "remote_group_id":"85cc3048-abc3-43cc-89b3-377341426ac5",
      "security_group_id":"a7734e61-b545-452d-a3cd-0189cbd9747a"
   }
}

 Response

 

Example 4.53. Create security group rule Response: JSON

{
   "security_group_rule":{
      "direction":"ingress",
      "ethertype":"IPv4",
      "id":"2bc0accf-312e-429a-956e-e4407625eb62",
      "port_range_max":80,
      "port_range_min":80,
      "protocol":"tcp",
      "remote_group_id":"85cc3048-abc3-43cc-89b3-377341426ac5",
      "remote_ip_prefix":null,
      "security_group_id":"a7734e61-b545-452d-a3cd-0189cbd9747a",
      "tenant_id":"e4f50856753b4dc6afee5fa6b9b6c550"
   }
}

Log a bug against this page


loading table of contents...