セキュリティグループ更新
Description
作成済みのセキュリティグループを更新します。
Request URL
Network API v2.0
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 | URI | キュリティグループIDを指定します。セキュリティグループ一覧取得 にて任意のセキュリティグループIDをご確認ください。 |
| name | セキュリティグループの名前 | plain | セキュリティグループに任意の名前を指定します。名前の重複はできません。 |
| description (Optional) | セキュリティグループの説明・概要 | plain | セキュリティグループに任意の説明・概要を指定します。 |
Response
-
Normal response codes
200
Example
-
Request
curl -i -X PUT \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "X-Auth-Token: トークンID" \ -d '{"security_group": {"name": "セキュリティグループの名前","description": "セキュリティグループの説明や概要"}}' \ ネットワークエンドポイント/security-groups/セキュリティグループID
-
Response
HTTP/1.1 200 OK
Date: Mon, 26 Mar 2018 10:28:31 GMT
Server: Apache
Content-Length: 1157
Content-Type: application/json
{
"security_group": {
"tenant_id": "テナントID",
"description": "セキュリティグループの説明・概要",
"id": "セキュリティグループID",
"security_group_rules": [
{
"remote_group_id": null,
"direction": "egress",
"remote_ip_prefix": null,
"protocol": null,
"ethertype": "IPv4",
"tenant_id": "テナントID",
"port_range_max": null,
"port_range_min": null,
"id": "セキュリティグループルールID",
"security_group_id": "セキュリティグループID"
},
{
"remote_group_id": null,
"direction": "egress",
"remote_ip_prefix": null,
"protocol": null,
"ethertype": "IPv6",
"tenant_id": "テナントID",
"port_range_max": null,
"port_range_min": null,
"id": "セキュリティグループルールID",
"security_group_id": "セキュリティグループID"
}
],
"name": "セキュリティグループの名前"
}
}