ユーザーガイド/リファレンスガイド

セキュリティグループ割り当て状態取得

Description

サーバーへのセキュリティグループの割り当て状態を取得します。

Request URL

Compute API v2.0
GET /v2/{tenant_id}/servers/{server_id}/os-security-groups

Request Json

This operation does not accept a request body.

Request Paramters

Parameter Value Style Description
X-Auth-Token Userトークン header トークンID
tenant_id テナントID URI テナントID
server_id サーバーID URI サーバーID

Response

Normal response codes

200

Example

Request

curl -i -X GET \
-H “Accept: application/json” \
-H “Content-Type: application/json” \
-H “X-Auth-Token: トークンID” \
https://compute.odc01.eva-clouds.com/v2/テナントID/servers/サーバーID/os-security-groups

Response

HTTP/1.1 200 OK
Date: Fri, 08 Jul 2016 01:40:27 GMT
Server: Apache
Content-Length: 692
Content-Type: application/json

{
    “security_groups”: [
        {
            “description”: “セキュリティグループの説明“,
             “id”: “セキュリティグループID“,
             “name”: “セキュリティグループ名“,
             “rules”: [
                {
                    “from_port”: 最小ポート番号,
                     “group”: {
                        “name”: “セキュリティグループ名“,
                         “tenant_id”: “テナントID
                    },
                     “id”: “セキュリティグループルールID“,
                     “ip_protocol”: プロトコル,
                     “ip_range”: {
                        “cidr”: “対象ネットワーク(CIDR表記)
                    },
                     “parent_group_id”: “セキュリティグループID“,
                     “to_port”: 最大ポート番号
                },
                 {
                    “from_port”: 最小ポート番号,
                     “group”: {
                        “name”: “セキュリティグループ名“,
                         “tenant_id”: “テナントID
                    },
                     “id”: “セキュリティグループルールID“,
                     “ip_protocol”: プロトコル,
                     “ip_range”: {
                        “cidr”: “対象ネットワーク(CIDR表記)
                    },
                     “parent_group_id”: “セキュリティグループID“,
                     “to_port”: 最大ポート番号
                }
            ],
             “tenant_id”: “テナントID
        }
    ] }