Description

セキュリティグループのセキュリティグループ名や概要を更新(変更)します。

Request URL

Network API

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

Request Json

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

Request Parameters

Parameter Value Style Description
X-Auth-Token トークンID header トークンIDを指定します。
security_group_id セキュリティグループID path セキュリティグループIDを指定します。
name
(Optional)
セキュリティグループ名 body 任意のセキュリティグループ名を指定します。
description
(Optional)
概要 body セキュリティグループが識別できるよう説明や概要を挿入したい場合に指定します。

Response Code

Success

200

Example

Request

curl -i -X PUT \
-H "Accept: application/json" \
-H "X-Auth-Token: トークンID" \
-d '{"security_group": {"name": "セキュリティグループ名","description": "概要"}}' \
https://networking.tyo1.conoha.io/v2.0/security-groups/セキュリティグループID

Response

HTTP/1.1 200 OK
Server: openresty/1.7.10.1
Date: Fri, 08 May 2015 12:36:52 GMT
Content-Type: application/json
Content-Length: 794
Connection: keep-alive

{
    "security_group": {
        "tenant_id": "22394afc818d471ca2f0308c06ae7460",
        "description": "security group for test-vm",
        "id": "d640f9e7-f329-4813-919e-0382799f6ce4",
        "security_group_rules": [
            {
                "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": "1bd0c423-e5dd-4313-a251-2211012d3dfa",
                "security_group_id": "d640f9e7-f329-4813-919e-0382799f6ce4"
            },
            {
                "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": "a8a9cfc5-8247-4f62-8ba5-2910c6ea8c30",
                "security_group_id": "d640f9e7-f329-4813-919e-0382799f6ce4"
            }
        ],
        "name": "test-02"
    }
}

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