• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. OpenStack Neutron APIs
  5. Security Group
  6. Querying a Security Group

Querying a Security Group

Function

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

URI

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

Request Message

None

Response Message

Table 1 Response parameter

Parameter

Type

Description

security_group

Dict

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

Example:

Example request

GET /v2.0/security-groups/0431c9c5-1660-42e0-8a00-134bec7f03e2

Example response

{
    "security_group": {
        "id": "0431c9c5-1660-42e0-8a00-134bec7f03e2",
        "name": "sg-ad3f",
        "description": "",
        "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
        "security_group_rules": [
            {
                "id": "d90e55ba-23bd-4d97-b722-8cb6fb485d69",
                "direction": "ingress",
                "protocol": null,
                "ethertype": "IPv4",
                "description": null,
                "remote_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2",
                "remote_ip_prefix": null,
                "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
                "port_range_max": null,
                "port_range_min": null,
                "security_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2"
            },
            {
                "id": "aecff4d4-9ce9-489c-86a3-803aedec65f7",
                "direction": "egress",
                "protocol": null,
                "ethertype": "IPv4",
                "description": null,
                "remote_group_id": null,
                "remote_ip_prefix": null,
                "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
                "port_range_max": null,
                "port_range_min": null,
                "security_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2"
            }
        ],
        "created_at": "2018-09-12T08:24:14",
        "updated_at": "2018-09-12T08:24:14"
    }
}

Status Codes

For details, see section Status Codes.

Error Codes

For details, see section Error Codes.