功能介紹
查詢提交請(qǐng)求的租戶有權(quán)限操作的所有安全組規(guī)則。單次查詢最多返回2000條數(shù)據(jù),超過(guò)2000后會(huì)返回分頁(yè)標(biāo)記。分頁(yè)查詢請(qǐng)參考分頁(yè)查詢。
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
GET /v2.0/security-group-rules
樣例:
GET https://{Endpoint}/v2.0/security-group-rules?security_group_id={security_group_id}&
remote_group_id={remote_group_id}&direction={direction}&
remote_ip_prefix={remote_ip_prefix}&protocol={protocol}&port_range_max={port_range_max}&
port_range_min={port_range_min}ðertype={ethertype}&
tenant_id ={tenant_id}
分頁(yè)查詢樣例:
GET https://{Endpoint}/v2.0/networks?limit=2&marker=07adc044-3f21-4eeb-bd57-5e5eb6024b7f&page_reverse=False
|
名稱 |
是否必選 |
參數(shù)類型 |
說(shuō)明 |
|---|---|---|---|
|
id |
否 |
String |
按照安全組規(guī)則對(duì)應(yīng)的id過(guò)濾查詢結(jié)果 |
|
description |
否 |
String |
按照description過(guò)濾查詢結(jié)果 |
|
remote_group_id |
否 |
String |
按照與此安全組規(guī)則關(guān)聯(lián)的遠(yuǎn)端安全組ID過(guò)濾查詢結(jié)果 |
|
security_group_id |
否 |
String |
按照與此安全組規(guī)則所屬的安全組ID過(guò)濾查詢結(jié)果 |
|
direction |
否 |
String |
按照安全組規(guī)則的方向過(guò)濾查詢結(jié)果,支持ingress和egress進(jìn)行過(guò)濾 |
|
protocol |
否 |
String |
按照安全組規(guī)則的IP協(xié)議過(guò)濾查詢結(jié)果 |
|
remote_ip_prefix |
否 |
String |
按照與此安全組規(guī)則匹配的遠(yuǎn)端IP網(wǎng)段過(guò)濾查詢結(jié)果 |
|
ethertype |
否 |
String |
按照網(wǎng)絡(luò)類型過(guò)濾查詢結(jié)果 |
|
port_range_max |
否 |
Integer |
按照最大端口過(guò)濾查詢結(jié)果 |
|
port_range_min |
否 |
Integer |
按照最小端口過(guò)濾查詢結(jié)果 |
|
tenant_id |
否 |
String |
按照項(xiàng)目ID過(guò)濾查詢結(jié)果 |
|
marker |
否 |
String |
分頁(yè)查詢的起始資源ID,表示從指定資源的下一條記錄開始查詢。 marker需要和limit配合使用:
|
|
limit |
否 |
Integer |
分頁(yè)查詢每頁(yè)返回的記錄個(gè)數(shù),取值范圍為0~intmax(2^31-1),默認(rèn)值2000。 limit需要和marker配合使用,詳細(xì)規(guī)則請(qǐng)見marker的參數(shù)說(shuō)明。 |
請(qǐng)求參數(shù)
無(wú)。
請(qǐng)求示例
GET https://{Endpoint}/v2.0/security-group-rules
響應(yīng)參數(shù)
|
參數(shù)名稱 |
類型 |
說(shuō)明 |
|---|---|---|
|
security_group_rules |
||
|
security_group_rules_links |
分頁(yè)信息。 只有在使用limit過(guò)濾,并且資源個(gè)數(shù)超過(guò)limit或者資源個(gè)數(shù)超過(guò)2000時(shí)(limit默認(rèn)值),該參數(shù)的rel和href取值才會(huì)顯示為next和其對(duì)應(yīng)的link。 |
|
屬性 |
類型 |
說(shuō)明 |
|---|---|---|
|
id |
String |
安全組規(guī)則id 使用說(shuō)明:查詢安全組規(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_rules": [
{
"remote_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967",
"direction": "ingress",
"remote_ip_prefix": null,
"protocol": null,
"tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
"port_range_max": null,
"security_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967",
"port_range_min": null,
"ethertype": "IPv6",
"description": null,
"id": "07adc044-3f21-4eeb-bd57-5e5eb6024b7f",
"project_id": "6c9298ec8c874f7f99688489ab65f90e",
"created_at": "2018-09-20T02:15:34",
"updated_at": "2018-09-20T02:15:34",
"remote_address_group_id": null
},
{
"remote_group_id": null,
"direction": "egress",
"remote_ip_prefix": null,
"protocol": null,
"tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
"port_range_max": null,
"security_group_id": "328fb454-a2ee-4a11-bdb1-ee19bbdfde43",
"port_range_min": null,
"ethertype": "IPv6",
"description": null,
"id": "09358f83-f4a5-4386-9563-a1e3c373d655",
"project_id": "6c9298ec8c874f7f99688489ab65f90e",
"created_at": "2018-09-20T02:15:34",
"updated_at": "2018-09-20T02:15:34",
"remote_address_group_id": null
},
{
"remote_group_id": "4c763030-366e-428c-be2b-d48f6baf5297",
"direction": "ingress",
"remote_ip_prefix": null,
"protocol": null,
"tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
"port_range_max": null,
"security_group_id": "4c763030-366e-428c-be2b-d48f6baf5297",
"port_range_min": null,
"ethertype": "IPv6",
"description": null,
"id": "219a6f56-1069-458b-bec0-df9270e7a074",
"project_id": "6c9298ec8c874f7f99688489ab65f90e",
"created_at": "2018-09-20T02:15:34",
"updated_at": "2018-09-20T02:15:34",
"remote_address_group_id": null
}
],
"security_group_rules_links": [
{ "rel": "previous",
"href": "https://{Endpoint}/v2.0/
security-group-rules?marker=07adc044-3f21-4eeb-bd57-5e5eb6024b7f&page_reverse=True"
}
]
}
狀態(tài)碼
請(qǐng)參見狀態(tài)碼。
錯(cuò)誤碼
請(qǐng)參見錯(cuò)誤碼。
最新文章
- 數(shù)據(jù)庫(kù)安全服務(wù)添加數(shù)據(jù)庫(kù)_數(shù)據(jù)庫(kù)安全服務(wù)添加Agent_數(shù)據(jù)庫(kù)安全服務(wù)添加安全組規(guī)則
- 數(shù)據(jù)安全-數(shù)據(jù)庫(kù)安全-審計(jì)RDS關(guān)系型數(shù)據(jù)庫(kù)
- VPC IP地址組_IP地址組怎么使用_路由前綴列表
- 云儲(chǔ)存服務(wù)器_云服務(wù)器配置_云桌面服務(wù)器_免費(fèi)一年的云服務(wù)器
- 快遞查詢API接口_快遞批量查詢_手機(jī)查詢快遞_位置查詢
- 手機(jī)查詢快遞_快遞物流查詢_快遞查詢API接口_快遞查詢
