Description
セキュリティグループを作成します。
セキュリティグループの上限は50個になります。
Request URL
Network API POST /v2.0/security-groups
Request Json
{
"security_group": {
"name": "セキュリティグループ名",
"description": "概要"
}
}
Request Parameters
| Parameter | Value | Style | Description |
|---|---|---|---|
| X-Auth-Token | トークンID | header | トークンIDを指定します。 |
| name | セキュリティグループ名 | body | 任意のセキュリティグループ名を指定します。 |
| description | 概要 | body | 作成するセキュリティグループが識別できるよう説明や概要を挿入したい場合に指定します。 |
Response Code
Success
201
Example
Request
curl -i -X POST -H "Accept: application/json" -H "X-Auth-Token: トークンID" -d '{"security_group": {"name": "セキュリティグループ名"}}' https://networking.tyo1.conoha.io/v2.0/security-groups
Response
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"
}
}
ConoHaにて提供しておりますAPIにつきましては、クラウド基盤として採用しておりますOpenStackの機能にて実装しておりますので、詳細な情報や使い方はOpenStackのドキュメントにてご確認ください。