• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Security groups and rules
  6. List security group rules

List security group rules

Function Description

This interface is used to query security group rules.

Interface Format

Method

URI

Description

GET

/v2.0/security-group-rules?security_group_id={security_group_id}&remote_group_id={remote_group_id}&direction={direction}&remote_ip_prefix={remote_ip_prefix}&protocol={protocol}&port_range_max={port_range_max}&port_range_min={port_range_min}&ethertype={ethertype}&tenant_id ={tenant_id}

Queries all the security group rules accessible to the tenant submitting the request.

Restrictions

N/A

Request Parameter

None

Response Parameter

Parameter

Type

Mandatory

Description

security_group_rules

List(security_group_rule)

Yes

Specifies the security group rule list. For details, see Table 2.

Request Example

GET  /v2.0/security-group-rules

Response Example

{
    "security_group_rules": [
        {
            "remote_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967",
            "direction": "ingress",
            "remote_ip_prefix": null,
            "protocol": null,
            "tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
            "port_range_max": null,
            "security_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967",
            "port_range_min": null,
            "ethertype": "IPv6",
"description": null,
            "id": "07adc044-3f21-4eeb-bd57-5e5eb6024b7f"
        },
        {
            "remote_group_id": null,
            "direction": "egress",
            "remote_ip_prefix": null,
            "protocol": null,
            "tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
            "port_range_max": null,
            "security_group_id": "328fb454-a2ee-4a11-bdb1-ee19bbdfde43",
            "port_range_min": null,
            "ethertype": "IPv6",
"description": null,
            "id": "09358f83-f4a5-4386-9563-a1e3c373d655"
        },
        {
            "remote_group_id": "4c763030-366e-428c-be2b-d48f6baf5297",
            "direction": "ingress",
            "remote_ip_prefix": null,
            "protocol": null,
            "tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
            "port_range_max": null,
            "security_group_id": "4c763030-366e-428c-be2b-d48f6baf5297",
            "port_range_min": null,
            "ethertype": "IPv6",
"description": null,
            "id": "219a6f56-1069-458b-bec0-df9270e7a074"
        }
]
}

Error Code

See section Return Code Processing.