Description
VMに割り当てられているセキュリティグループの情報を取得します。
Request URL
Compute API
GET /v2/{tenant_id}/servers/{server_id}/os-security-groups
Request Json
This operation does not accept a request body.
Request Parameters
| Parameter | Value | Style | Description |
|---|---|---|---|
| X-Auth-Token | トークンID | header | トークンIDを指定します。 |
| tenant_id | テナントID | path | テナントIDを指定します。 |
| server_id | サーバーID | path | サーバーIDを指定します。 |
Response Code
Success
200
Example
Request
curl -i -X GET -H "Accept: application/json" -H "X-Auth-Token: トークンID" https://compute.tyo1.conoha.io/v2/テナントID/servers/サーバーID/os-security-groups
Response
HTTP/1.1 200 OK
Date: Thu, 11 Dec 2014 05:19:59 GMT
Server: Apache
Content-Length: 649
Content-Type: application/json
{
"security_groups": [
{
"description": "sample-description",
"id": "7171b7d6-9095-4491-a48b-995757f22864",
"name": "sample-ipv4-ssh",
"rules": [
{
"from_port": 22,
"group": {},
"id": "fd32dc7b-6eb3-4c0b-9bc0-bcc29c687bf6",
"ip_protocol": "tcp",
"ip_range": {
"cidr": "0.0.0.0/0"
},
"parent_group_id": "7171b7d6-9095-4491-a48b-995757f22864",
"to_port": 22
}
],
"tenant_id": "1864e71d2deb46f6b47526b69c65a45d"
},
{
"description": "sample-description",
"id": "ce9b2e74-3476-473b-8b9b-697ab6642e39",
"name": "sample-ipv6-ssh",
"rules": [
{
"from_port": 22,
"group": {},
"id": "a2aa4928-f39b-4a06-967a-cc37dca89edf",
"ip_protocol": "tcp",
"ip_range": {
"cidr": "0.0.0.0/0"
},
"parent_group_id": "ce9b2e74-3476-473b-8b9b-697ab6642e39",
"to_port": 22
}
],
"tenant_id": "1864e71d2deb46f6b47526b69c65a45d"
}
]
}
ConoHaにて提供しておりますAPIにつきましては、クラウド基盤として採用しておりますOpenStackの機能にて実装しておりますので、詳細な情報や使い方はOpenStackのドキュメントにてご確認ください。