功能介紹
查詢安全組詳情。
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
GET /v2.0/security-groups/{security_group_id}
請(qǐng)求參數(shù)
無。
請(qǐng)求示例
GET https://{Endpoint}/v2.0/security-groups/0431c9c5-1660-42e0-8a00-134bec7f03e2
響應(yīng)參數(shù)
|
參數(shù)名稱 |
類型 |
說明 |
|---|---|---|
|
security_group |
|
屬性 |
類型 |
說明 |
|---|---|---|
|
id |
String |
安全組的id 使用說明:查詢安全組列表非必選 |
|
tenant_id |
String |
項(xiàng)目ID |
|
name |
String |
安全組名稱 |
|
description |
String |
安全組描述 |
|
security_group_rules |
||
|
project_id |
String |
項(xiàng)目ID,請(qǐng)參見獲取項(xiàng)目ID。 |
|
created_at |
String |
資源創(chuàng)建時(shí)間,UTC時(shí)間 格式:yyyy-MM-ddTHH:mm:ss |
|
updated_at |
String |
資源更新時(shí)間,UTC時(shí)間 格式:yyyy-MM-ddTHH:mm:ss |
|
屬性 |
類型 |
說明 |
|---|---|---|
|
id |
String |
安全組規(guī)則id 使用說明:查詢安全組規(guī)則非必選 |
|
description |
String |
安全組規(guī)則描述 |
|
security_group_id |
String |
所屬安全組id |
|
remote_group_id |
String |
所屬安全組的對(duì)端id |
|
direction |
String |
規(guī)則方向 |
|
remote_ip_prefix |
String |
對(duì)端ip網(wǎng)段 |
|
protocol |
String |
協(xié)議類型或直接指定IP協(xié)議號(hào) |
|
port_range_max |
Integer |
最大端口,當(dāng)協(xié)議類型為ICMP時(shí),該值表示ICMP的code |
|
port_range_min |
Integer |
最小端口,當(dāng)協(xié)議類型為ICMP時(shí),該值表示ICMP的type。 protocol為tcp和udp時(shí),port_range_max和port_range_min必須同時(shí)輸入,且port_range_max應(yīng)大于等于port_range_min。 protocol為icmp時(shí),指定ICMP code(port_range_max)時(shí),必須同時(shí)指定ICMP type(port_range_min)。 |
|
ethertype |
String |
網(wǎng)絡(luò)類型 支持IPv4,IPv6 |
|
tenant_id |
String |
項(xiàng)目ID |
|
remote_address_group_id |
String |
|
|
project_id |
String |
項(xiàng)目ID,請(qǐng)參見獲取項(xiàng)目ID。 |
|
created_at |
String |
資源創(chuàng)建時(shí)間,UTC時(shí)間 格式:yyyy-MM-ddTHH:mm:ss |
|
updated_at |
String |
資源更新時(shí)間,UTC時(shí)間 格式:yyyy-MM-ddTHH:mm:ss |
響應(yīng)示例
{
"security_group": {
"id": "0431c9c5-1660-42e0-8a00-134bec7f03e2",
"name": "sg-ad3f",
"description": "",
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"security_group_rules": [
{
"id": "d90e55ba-23bd-4d97-b722-8cb6fb485d69",
"direction": "ingress",
"protocol": null,
"ethertype": "IPv4",
"description": null,
"remote_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2",
"remote_ip_prefix": null,
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"port_range_max": null,
"port_range_min": null,
"security_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2",
"remote_address_group_id": "0150a3a7-82ca-4569-865c-04e46e5e9249"
},
{
"id": "aecff4d4-9ce9-489c-86a3-803aedec65f7",
"direction": "egress",
"protocol": null,
"ethertype": "IPv4",
"description": null,
"remote_group_id": null,
"remote_ip_prefix": null,
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"port_range_max": null,
"port_range_min": null,
"security_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2",
"remote_address_group_id": null
}
],
"created_at": "2018-09-12T08:24:14",
"updated_at": "2018-09-12T08:24:14"
}
}
狀態(tài)碼
請(qǐng)參見狀態(tài)碼。
錯(cuò)誤碼
請(qǐng)參考錯(cuò)誤碼。
