セキュリティグループ作成

Description

新しいセキュリティグループを作成します。
セキュリティグループの上限は50個になります。

Request URL

Network API v2.0

POST /v2.0/security-groups

Request Json

{
    "security_group": {
        "name": "セキュリティグループの名前",
        "description": "セキュリティグループの説明や概要"
    }
}

Request Parameters

Parameter Value Style Description
X-Auth-Token Userトークン header トークン発行 にて払い出されたID
name セキュリティグループの名前 plain セキュリティグループに任意の名前を指定します。
名前の重複はできません。
description (Optional) セキュリティグループの説明・概要 plain セキュリティグループに任意の説明・概要を指定します。

Response

  • Normal response codes
201

Example

  • Request
curl -i -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: トークンID" \
-d '{"security_group": {"name": "セキュリティグループの名前"}}' \
https://networking.jpt1.cloud.z.com/v2.0/security-groups
  • Response
HTTP/1.1 201 Created
Date: Thu, 07 Jul 2016 07:13:32 GMT
Server: Apache
Content-Length: 817
Content-Type: application/json

{
    "security_group": {
        "description": "",
        "id": "セキュリティグループID",
        "name": "セキュリティグループの名前",
        "security_group_rules": [
            {
                "direction": "ルールを適用するトラフィックの向き",
                "ethertype": "イーサタイプ",
                "id": "セキュリティグループルールID",
                "port_range_max": null,
                "port_range_min": null,
                "protocol": null,
                "remote_group_id": null,
                "remote_ip_prefix": null,
                "security_group_id": "セキュリティグループID",
                "tenant_id": "テナントID"
            },
            {
                "direction": "ルールを適用するトラフィックの向き",
                "ethertype": "イーサタイプ",
                "id": "セキュリティグループルールID",
                "port_range_max": null,
                "port_range_min": null,
                "protocol": null,
                "remote_group_id": null,
                "remote_ip_prefix": null,
                "security_group_id": "セキュリティグループID",
                "tenant_id": "テナントID"
            }
        ],
        "tenant_id": "テナントID"
    }
}

Internet for everyone

Copyright (c) 2024 GMO Internet Group, Inc. All Rights Reserved.