• Native OpenStack API

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

Show security group

Function Description

This interface is used to query details about a specific security group.

Interface Format

Method

URI

Description

GET

/v2.0/security-groups/{security_group_id}

Queries details about the specified security group.

Restrictions

N/A

Request Parameter

None

Response Parameter

Parameter

Type

Mandatory

Description

security_group

Dict

Yes

Specifies the security group. For details, see Table 1.

Request Example

GET  /v2.0/security-groups/1d8b19c7-7c56-48f7-a99b-4b40eb390967

Response Example

{
    "security_group": {
        "tenant_id": "84b25ac10ed642cca484aa55c098e3aa",
        "name": "default",
        "description": "Default security group",
        "security_group_rules": [
            {
                "remote_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967",
                "direction": "ingress",
                "remote_ip_prefix": null,
                "protocol": null,
                "ethertype": "IPv6",
                "tenant_id": "84b25ac10ed642cca484aa55c098e3aa",
                "port_range_max": null,
                "port_range_min": null,
                "id": "07adc044-3f21-4eeb-bd57-5e5eb6024b7f",
"description": null,
                "security_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967"
            },
            {
                "remote_group_id": null,
                "direction": "egress",
                "remote_ip_prefix": null,
                "protocol": null,
                "ethertype": "IPv6",
                "tenant_id": "84b25ac10ed642cca484aa55c098e3aa",
                "port_range_max": null,
                "port_range_min": null,
                "id": "47e05c14-1aa2-4355-aaf8-b57e18f98c9a",
"description": null,
                "security_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967"
            },
            {
                "remote_group_id": null,
                "direction": "egress",
                "remote_ip_prefix": null,
                "protocol": null,
                "ethertype": "IPv4",
                "tenant_id": "84b25ac10ed642cca484aa55c098e3aa",
                "port_range_max": null,
                "port_range_min": null,
                "id": "8a8a238b-fdb1-4321-b667-26205c7f37d1",
"description": null,
                "security_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967"
            },
            {
                "remote_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967",
                "direction": "ingress",
                "remote_ip_prefix": null,
                "protocol": null,
                "ethertype": "IPv4",
                "tenant_id": "84b25ac10ed642cca484aa55c098e3aa",
                "port_range_max": null,
                "port_range_min": null,
                "id": "b5874440-84a0-4382-8e37-3f012b90b71e",
"description": null,
                "security_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967"
            }
        ],
        "id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967"
    }
}

Error Code

See section Return Code Processing.