Description
セキュリティグループの一覧を取得します。
Request URL
Network API GET /v2.0/security-groups
Request Json
This operation does not accept a request body.
Request Parameters
| Parameter | Value | Style | Description |
|---|---|---|---|
| X-Auth-Token | トークン | header | トークンの情報を指定します。トークンの発行方法は、トークン発行 にてご確認ください。 |
| fields(Optional) | フィールド名 | query | レスポンス内容を特定のフィールドのみにフィルターしたい場合に利用します。レスポンス結果で得たいフィールド名を指定します。 |
Response Code
Success
200
Example
Request
curl -X GET
-H "Accept: application/json"
-H "X-Auth-Token: トークン"
https://networking.c3j1.conoha.io/v2.0/security-groups
Response
{
"security_groups": [
{
"id": "セキュリティグループID",
"name": "セキュリティグループ名",
"tenant_id": "テナントID",
"description": "Default security group",
"shared": false,
"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"
},
{
"id": "セキュリティグループルールID",
"tenant_id": "テナントID",
"security_group_id": "セキュリティグループID",
"ethertype": "IPv6",
"direction": "ingress",
"protocol": null,
"port_range_min": null,
"port_range_max": null,
"remote_ip_prefix": null,
"remote_group_id": "セキュリティグループID",
"project_id": "テナントID"
},
{
"id": "セキュリティグループルールID",
"tenant_id": "テナントID",
"security_group_id": "セキュリティグループID",
"ethertype": "IPv4",
"direction": "ingress",
"protocol": null,
"port_range_min": null,
"port_range_max": null,
"remote_ip_prefix": null,
"remote_group_id": "セキュリティグループID",
"project_id": "テナントID"
}
],
"project_id": "テナントID"
}
]
}
ConoHaにて提供しておりますAPIにつきましては、クラウド基盤として採用しておりますOpenStackの機能にて実装しておりますので、詳細な情報や使い方はOpenStackのドキュメントにてご確認ください。