MENU
セキュリティグループ更新 - Network API v2.0
Description
- APIからコントロールパネル上のセキュリティグループを更新することはできません。
- コントロールパネル上のセキュリティグループと同一の名前を付けることはできません。
Request URL
Network API v2.0 PUT /v2.0/security-groups/{security_group_id}
Request Paramters
Parameter | Value | Style | Description |
---|---|---|---|
X-Auth-Token | Userトークン | header | トークンID |
security_group_id | security_group ID | URI | セキュリティグループID |
name(Optional) | name | plain | A symbolic name for the security group. Not required to be unique. |
description (Optional) | description | plain | Describes the security group. |
Request Json
{ "security_group": { "name": "secgrp-test-01-update", "description": "security group for test-vm" } }
Normal response codes
200
Example
※エンドポイントURLにつきましては、お客様環境によって異なりますので、コントロールパネルにてご確認の上ご利用ください。
- REQ
curl -i -X PUT \ -H "Accept: application/json" \ -H "X-Auth-Token: 0925897a3d4543218ff0dcd2bb378a8e" \ -d '{"security_group": {"name": "test-02","description": "security group for test-vm"}}' \ https://networking.tyo1.conoha.io/v2.0/security-groups/d640f9e7-f329-4813-919e-0382799f6ce4
- RES
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" } }