Description

作成済みセキュリティグループの「セキュリティグループ名」や「description」を更新(変更)します。

Request URL

Network API

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

Request Json

{
  "security_group": {
    "name": "セキュリティグループ名",
    "description": "セキュリティグループの説明"
  }
}

Request Parameters

Parameter Value Style Description
X-Auth-Token トークン header トークンの情報を指定します。
トークンの発行方法は、トークン発行 にてご確認ください。
securitygroupsid セキュリティグループID path セキュリティグループIDを指定します。
セキュリティグループIDの確認方法は、セキュリティグループ一覧取得 を実行の上、レスポンス結果から対象セキュリティグループのセキュリティグループIDをご確認ください。
name
(Optional)
セキュリティグループ名 body セキュリティグループ名を指定します。
description
(Optional)
セキュリティグループの説明 body 作成するセキュリティグループが識別できるよう説明や概要を挿入したい場合に指定します。

Response Code

Success

200

Example

Request

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

Response

{
	"security_group": {
		"id": "セキュリティグループID",
		"name": "セキュリティグループ名",
		"tenant_id": "テナントID",
		"description": "",
		"security_group_rules": [
			{
				"id": "セキュリティグループルールID",
				"tenant_id": "テナントID",
				"security_group_id": "セキュリティグループID",
				"ethertype": "IPv6",
				"direction": "egress",
				"protocol": null,
				"port_range_min": null,
				"port_range_max": null,
				"remote_ip_prefix": null,
				"remote_group_id": null,
				"project_id": "テナントID"
			},
			{
				"id": "セキュリティグループルールID",
				"tenant_id": "テナントID",
				"security_group_id": "セキュリティグループID",
				"ethertype": "IPv4",
				"direction": "egress",
				"protocol": null,
				"port_range_min": null,
				"port_range_max": null,
				"remote_ip_prefix": null,
				"remote_group_id": null,
				"project_id": "テナントID"
			}
		],
		"project_id": "テナントID"
	}
}

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