功能介紹
查詢安全組規(guī)則列表。
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
GET /v1/{project_id}/security-group-rules
GET https://{Endpoint}/v1/{project_id}/security-group-rules?
security_group_id=a7734e61-b545-452da3cd-0189cbd9747a&limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d
|
名稱 |
是否必選 |
參數(shù)類型 |
說明 |
|---|---|---|---|
|
project_id |
是 |
String |
項目ID,獲取項目ID請參見獲取項目ID。 |
|
marker |
否 |
String |
分頁查詢的起始資源ID,表示從指定資源的下一條記錄開始查詢。 marker需要和limit配合使用:
|
|
limit |
否 |
Integer |
分頁查詢每頁返回的記錄個數(shù),取值范圍為0~intmax(2^31-1),默認(rèn)值2000。 limit需要和marker配合使用,詳細規(guī)則請見marker的參數(shù)說明。 |
|
security_group_id |
否 |
String |
功能說明:安全組標(biāo)識 |
請求參數(shù)
無
請求示例
GET https://{Endpoint}/v1/{project_id}/security-group-rules
響應(yīng)參數(shù)
|
名稱 |
參數(shù)類型 |
說明 |
|---|---|---|
|
id |
String |
安全組規(guī)則標(biāo)識 |
|
description |
String |
|
|
security_group_id |
String |
安全組標(biāo)識 |
|
direction |
String |
|
|
ethertype |
String |
|
|
protocol |
String |
|
|
port_range_min |
Integer |
|
|
port_range_max |
Integer |
|
|
remote_ip_prefix |
String |
|
|
remote_group_id |
String |
|
|
remote_address_group_id |
String |
|
|
tenant_id |
String |
|
響應(yīng)示例
{
"security_group_rules": [
{
"direction": "egress",
"ethertype": "IPv6",
"id": "3c0e45ff-adaf-4124-b083-bf390e5482ff",
"description": "",
"port_range_max": null,
"port_range_min": null,
"protocol": null,
"remote_group_id": null,
"remote_ip_prefix": null,
"security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
"tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550",
"remote_address_group_id": null
},
{
"direction": "egress",
"ethertype": "IPv4",
"id": "93aa42e5-80db-4581-9391-3a608bd0e448",
"description": "",
"port_range_max": null,
"port_range_min": null,
"protocol": null,
"remote_group_id": null,
"remote_ip_prefix": null,
"security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
"tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550",
"remote_address_group_id": null
},
{
"direction": "ingress",
"ethertype": "IPv6",
"id": "c0b09f00-1d49-4e64-a0a7-8a186d928138",
"description": "",
"port_range_max": null,
"port_range_min": null,
"protocol": null,
"remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
"remote_ip_prefix": null,
"security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
"tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550",
"remote_address_group_id": null
},
{
"direction": "ingress",
"ethertype": "IPv4",
"id": "f7d45c89-008e-4bab-88ad-d6811724c51c",
"description": "",
"port_range_max": null,
"port_range_min": null,
"protocol": null,
"remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
"remote_ip_prefix": null,
"security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5",
"tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550",
"remote_address_group_id": null
}
]
}
狀態(tài)碼
請參見狀態(tài)碼。
錯誤碼
請參考錯誤碼。
