4.11 网络 ACL
4.11.3 查询网络 ACL 详情
功能介绍
查询网络ACL详情。
调试
您可以在API Explorer中调试该接口。
URI
GET /v1/firewalls/{firewall_id}
表4-282 路径参数
参数 是否必选 参数类型 描述
firewall_id 是 String 网络ACL ID 最小长度:36 最大长度:36
请求参数
表4-283 请求 Header 参数
参数 是否必选 参数类型 描述
X-Auth-Token 是 String 用户Token。
通过调用IAM服务获取用户 Token接口获取(响应消息头中 X-Subject-Token的值)。
响应参数
状态码: 200
表4-284 响应 Body 参数
参数 参数类型 描述
firewall Firewall
object 网络ACL对象。
表4-285 Firewall
参数 参数类型 描述
id String 网络ACL ID
name String 网络ACL名称。
最小长度:1 最大长度:64 admin_state_
up Boolean 网络ACL使能开关。
取值范围:true(开启),false(关闭)。默认 为true
缺省值:true status String 网络ACL状态。
取值范围:INACTIVE 枚举值:
● INACTIVE description String 网络ACL描述。
最小长度:0 最大长度:64 domain_id String 租户domainID
最小长度:0 最大长度:36 egress_firewal
l_policy FirewallPolic
y object 出方向网络ACL策略。 创建或查询防火墙列表时
只返回ACL策略ID。
egress_firewal
l_rule_count Integer 出方向网络ACL规则个数。
ingress_firewa
ll_policy FirewallPolic
y object 入方向网络ACL策略。 创建或查询防火墙列表时
只返回ACL策略ID。
ingress_firewa
ll_rule_count Integer 入方向网络ACL规则个数。
表4-286 FirewallPolicy
参数 参数类型 描述
id String 网络ACL策略ID。
name String 网络ACL策略名称。
最小长度:0 最大长度:64 firewall_rules Array of
FirewallRule objects
网络ACL规则列表对象。
insert_after String ACL规则ID,表示在此ACL规则之后添加ACL规则 insert_before String ACL规则ID,表示在此ACL规则之前添加ACL规则
表4-287 FirewallRule
参数 参数类型 描述
action String 策略是否允许
取值范围:allow,deny,reject 枚举值:
● allow
● deny
● reject
description String 网络ACL规则描述。
最小长度:0 最大长度:64 destination_ip
_address String 目的地IP地址,IPv4的CIDR格式 destination_p
ort String 目的地端口范围
取值范围:整数,比如80,或者以"-"隔开的范 围,比如80-90
enabled Boolean 网络ACL规则使能开关。
取值范围:true,false 缺省值:true
id String 网络ACL规则ID。
进行更新规则时,如果operate_type为add,则该 值为空。
ip_version Integer IP协议版本 取值范围:4
参数 参数类型 描述
name String 网络ACL规则名称。
最小长度:0 最大长度:64
operate_type String 网络ACL规则操作状态,作为请求时取值为
"add"/"modify"/"delete",作为返回值时为
"normal"。 当请求更新规则时,本参数值为 delete时,除id之外,本请求体其他参数均可为 空。
枚举值:
● add
● modify
● delete
protocol String IP协议,为any时代表所有协议 取值范围:icmp,tcp,udp,any
ress String 源IP地址,IPv4的CIDR格式 source_port String 源地端口范围
取值范围:整数,比如80,或者以"-"隔开的范 围,比如80-90
请求示例
GET https://{endpoint}/v1/firewalls/c2c5234b-67ff-11ea-a41a-00e04c9bd2a3
响应示例
状态码: 200 OK
{ "firewall" : {
"id" : "c2c5234b-67ff-11ea-a41a-00e04c9bd2a3", "domain_id" : "2b76febbe5d34eac85d26435c1f15809", "name" : "test",
"description" : "test", "admin_state_up" : true, "status" : "INACTIVE", "ingress_firewall_policy" : {
"id" : "dd1b46d8-bff8-41d5-b79d-b96c300371d7", "name" : "ingress_firewall_policy",
"firewall_rules" : [ {
"id" : "1d49edb1-6845-11ea-95d5-00e04c9bd2a3", "name" : "test",
"destination_ip_address" : "0.0.0.0/12", "destination_port" : "443",
"egress_firewall_policy" : {
"id" : "55821488-d69b-596c-b529-9c5e16734811", "name" : "egress_firewall_policy",
"firewall_rules" : [ {
"id" : "5cb41787-6804-11ea-a41a-00e04c9bd2a3", "name" : "testt",
"destination_ip_address" : "0.0.0.0/12", "destination_port" : "443",
"id" : "21a9003a-4aca-4818-a7ec-fac39d9edeef", "name" : "test-9395",
"vpc_id" : "872b0af3-6826-11ea-b42b-286ed488d287", "cidr" : "172.16.48.0/20",
"gateway_ip" : "172.16.48.1", "dhcp_enable" : true,
"primary_dns" : "114.114.114.114", "secondary_dns" : "8.8.8.8"
}, {
"id" : "2747a93b-192f-4397-9fd5-eb1af315eb69", "name" : "test-5234",
"vpc_id" : "872b0af3-6826-11ea-b42b-286ed488d287", "cidr" : "172.16.32.0/20",
"gateway_ip" : "172.16.32.1", "dhcp_enable" : true,
"primary_dns" : "114.114.114.114", "secondary_dns" : "8.8.8.8"