MENU
セキュリティグループ作成 - Network API v2.0
Description
- セキュリティグループは50個まで作成可能です
- APIから作成したセキュリティグループをコントロールパネルから使用することはできません
Request URL
Network API v2.0 POST /v2.0/security-groups
Request Paramters
Parameter | Value | Style | Description |
---|---|---|---|
X-Auth-Token | Userトークン | header | トークンID |
name | name | plain | A symbolic name for the security group. 名前の重複はできません。 |
description (Optional) | description | plain | Describes the security group. |
Request Json
{ "security_group": { "name": "new-webservers", "description": "security group for webservers" } }
Normal response codes
201
Example
※エンドポイントURLにつきましては、お客様環境によって異なりますので、コントロールパネルにてご確認の上ご利用ください。
- REQ
curl -i -X POST \ -H "Accept: application/json" \ -H "X-Auth-Token: 0925897a3d4543218ff0dcd2bb378a8e" \ -d '{"security_group": {"name": "test-01"}}' \ https://networking.tyo1.conoha.io/v2.0/security-groups
- RES
HTTP/1.1 201 Created Server: openresty/1.7.10.1 Date: Fri, 08 May 2015 12:32:31 GMT Content-Type: application/json Content-Length: 768 Connection: keep-alive { "security_group": { "tenant_id": "22394afc818d471ca2f0308c06ae7460", "description": "", "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-01" } }