Description

セキュリティグループの一覧を取得します。

Request URL

Network API

GET /v2.0/security-groups

Request Json

This operation does not accept a request body.

Request Parameters

Parameter Value Style Description
X-Auth-Token トークンID header トークンIDを指定します。

Response Code

Success

200

Example

Request

curl -i -X GET \
-H "Accept: application/json" \
-H "X-Auth-Token: トークンID" \
https://networking.tyo1.conoha.io/v2.0/security-groups

Response

HTTP/1.1 200 OK
Server: openresty/1.7.10.1
Date: Fri, 08 May 2015 08:34:24 GMT
Content-Type: application/json
Content-Length: 6609
Connection: keep-alive

{
    "security_groups": [
        {
            "tenant_id": "22394afc818d471ca2f0308c06ae7460",
            "description": "default",
            "id": "6cdb77f5-0e85-49cf-b093-acb3ab41e730",
            "security_group_rules": [
                {
                    "remote_group_id": null,
                    "direction": "egress",
                    "remote_ip_prefix": null,
                    "protocol": null,
                    "ethertype": "IPv6",
                    "tenant_id": "22394afc818d471ca2f0308c06ae7460",
                    "port_range_max": null,
                    "port_range_min": null,
                    "id": "2ffdf2d2-3b2a-4b3a-89a2-fb5b2a9f8811",
                    "security_group_id": "6cdb77f5-0e85-49cf-b093-acb3ab41e730"
                },
                {
                    "remote_group_id": "6cdb77f5-0e85-49cf-b093-acb3ab41e730",
                    "direction": "ingress",
                    "remote_ip_prefix": null,
                    "protocol": null,
                    "ethertype": "IPv6",
                    "tenant_id": "22394afc818d471ca2f0308c06ae7460",
                    "port_range_max": null,
                    "port_range_min": null,
                    "id": "4117d7a3-e0ac-4f71-823a-e524d1d4ffc1",
                    "security_group_id": "6cdb77f5-0e85-49cf-b093-acb3ab41e730"
                },
                {
                    "remote_group_id": "6cdb77f5-0e85-49cf-b093-acb3ab41e730",
                    "direction": "ingress",
                    "remote_ip_prefix": null,
                    "protocol": null,
                    "ethertype": "IPv4",
                    "tenant_id": "22394afc818d471ca2f0308c06ae7460",
                    "port_range_max": null,
                    "port_range_min": null,
                    "id": "8238b994-abea-42e6-b872-be475d5b306e",
                    "security_group_id": "6cdb77f5-0e85-49cf-b093-acb3ab41e730"
                },
                {
                    "remote_group_id": null,
                    "direction": "egress",
                    "remote_ip_prefix": null,
                    "protocol": null,
                    "ethertype": "IPv4",
                    "tenant_id": "22394afc818d471ca2f0308c06ae7460",
                    "port_range_max": null,
                    "port_range_min": null,
                    "id": "c79e56f0-d180-499c-bb4a-f6cd6f155eb7",
                    "security_group_id": "6cdb77f5-0e85-49cf-b093-acb3ab41e730"
                }
            ],
            "name": "default"
        },
        {
            "tenant_id": "22394afc818d471ca2f0308c06ae7460",
            "description": "gncs-ipv4-ssh",
            "id": "bda5122c-81bc-4dc5-b353-2d349c3e2063",
            "security_group_rules": [
                {
                    "remote_group_id": null,
                    "direction": "egress",
                    "remote_ip_prefix": null,
                    "protocol": null,
                    "ethertype": "IPv6",
                    "tenant_id": "22394afc818d471ca2f0308c06ae7460",
                    "port_range_max": null,
                    "port_range_min": null,
                    "id": "87cc8101-9798-4e91-a0fd-a3fd3e25dae0",
                    "security_group_id": "bda5122c-81bc-4dc5-b353-2d349c3e2063"
                },
                {
                    "remote_group_id": null,
                    "direction": "egress",
                    "remote_ip_prefix": null,
                    "protocol": null,
                    "ethertype": "IPv4",
                    "tenant_id": "22394afc818d471ca2f0308c06ae7460",
                    "port_range_max": null,
                    "port_range_min": null,
                    "id": "c291e64a-e450-454a-89ae-5ee6e5b62717",
                    "security_group_id": "bda5122c-81bc-4dc5-b353-2d349c3e2063"
                },
                {
                    "remote_group_id": null,
                    "direction": "ingress",
                    "remote_ip_prefix": null,
                    "protocol": "tcp",
                    "ethertype": "IPv4",
                    "tenant_id": "22394afc818d471ca2f0308c06ae7460",
                    "port_range_max": 22,
                    "port_range_min": 22,
                    "id": "c3cfce5b-ae1f-4579-8a45-d323bb281069",
                    "security_group_id": "bda5122c-81bc-4dc5-b353-2d349c3e2063"
                }
            ],
            "name": "gncs-ipv4-ssh"
        }
    ]
}

ConoHaにて提供しておりますAPIにつきましては、クラウド基盤として採用しておりますOpenStackの機能にて実装しておりますので、詳細な情報や使い方はOpenStackのドキュメントにてご確認ください。