查询安全组规则
功能介绍
查询安全组规则详情。
调试
您可以在API Explorer中调试该接口。
URI
GET /v2.0/security-group-rules/{security_group_rule_id}
请求参数
无。
请求示例
GET https://{Endpoint}/v2.0/security-group-rules/1755bc80-cf3a-4f57-8ae9-d9796482ddc0 响应参数
参数名称 | 类型 | 说明 |
|---|---|---|
security_group_rule | security_group_rule object | security group rule对象。请参见表2。 |
参数名称 | 类型 | 说明 |
|---|---|---|
id | String | 安全组规则id 使用说明:查询安全组规则非必选 |
description | String | 安全组规则描述 |
security_group_id | String | 所属安全组id |
remote_group_id | String | 所属安全组的对端id |
direction | String | 规则方向 |
remote_ip_prefix | String | 对端ip网段 |
protocol | String | 协议类型或直接指定IP协议号 |
port_range_max | Integer | 最大端口,当协议类型为ICMP时,该值表示ICMP的code |
port_range_min | Integer | 最小端口,当协议类型为ICMP时,该值表示ICMP的type。 protocol为tcp和udp时,port_range_max和port_range_min必须同时输入,且port_range_max应大于等于port_range_min。 protocol为icmp时,指定ICMP code(port_range_max)时,必须同时指定ICMP type(port_range_min)。 |
ethertype | String | 网络类型 支持IPv4,IPv6 |
tenant_id | String | 项目ID |
remote_address_group_id | String |
|
project_id | String | 项目ID,请参见获取项目ID。 |
created_at | String | 资源创建时间,UTC时间 格式:yyyy-MM-ddTHH:mm:ss |
updated_at | String | 资源更新时间,UTC时间 格式:yyyy-MM-ddTHH:mm:ss |
响应示例
{
"security_group_rule": {
"remote_group_id": null,
"direction": "egress",
"remote_ip_prefix": null,
"protocol": null,
"tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
"port_range_max": null,
"security_group_id": "723bc02c-d7f7-49b5-b6ff-d08320f315e2",
"port_range_min": null,
"ethertype": "IPv4",
"description": null,
"id": "1755bc80-cf3a-4f57-8ae9-d9796482ddc0",
"project_id": "6fbe9263116a4b68818cf1edce16bc4f",
"created_at": "2018-09-20T02:15:34",
"updated_at": "2018-09-20T02:15:34",
"remote_address_group_id": null
}
} 状态码
请参见状态码。
错误码
请参见错误码。

