更新时间:2024-01-02 GMT+08:00
分享

查询网络ACL列表

功能介绍

查询网络ACL列表。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v1/firewalls

表1 Query参数

参数

是否必选

参数类型

描述

id

String

通过ID过滤网络ACL。

limit

Integer

每页返回的个数

取值范围:0~1000

最小值:0

最大值:1000

name

String

通过name模糊匹配网络ACL。

offset

Integer

查询的偏移量。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

响应参数

状态码: 200

表3 响应Body参数

参数

参数类型

描述

count

Integer

网络ACL数量。

firewalls

Array of Firewall objects

网络ACL列表。

表4 Firewall

参数

参数类型

描述

id

String

网络ACL ID

name

String

网络ACL名称。

最小长度:1

最大长度:64

admin_state_up

Boolean

网络ACL使能开关。

取值范围:true(开启),false(关闭)。默认为true

缺省值:true

status

String

网络ACL状态。

取值范围:INACTIVE

description

String

网络ACL描述。

最小长度:0

最大长度:64

domain_id

String

租户domainID

最小长度:0

最大长度:36

egress_firewall_policy

FirewallPolicyResp object

出方向网络ACL策略。 创建或查询防火墙列表时只返回ACL策略ID。

egress_firewall_rule_count

Integer

出方向网络ACL规则个数。

ingress_firewall_policy

FirewallPolicyResp object

入方向网络ACL策略。 创建或查询防火墙列表时只返回ACL策略ID。

ingress_firewall_rule_count

Integer

入方向网络ACL规则个数。

表5 FirewallPolicyResp

参数

参数类型

描述

id

String

网络ACL策略ID。

name

String

网络ACL策略名称。

最小长度:0

最大长度:64

firewall_rules

Array of FirewallRuleResp objects

网络ACL规则列表对象。

数组长度:0 - 1

insert_after

String

ACL规则ID,表示在此ACL规则之后添加ACL规则

insert_before

String

ACL规则ID,表示在此ACL规则之前添加ACL规则

表6 FirewallRuleResp

参数

参数类型

描述

action

String

策略是否允许

取值范围:allow,deny,reject

description

String

网络ACL规则描述。

最小长度:0

最大长度:64

destination_ip_address

String

目的地IP地址,IPv4或IPv6的CIDR格式

destination_port

String

目的地端口范围

取值范围:整数,比如80,或者以"-"隔开的范围,比如80-90

enabled

Boolean

网络ACL规则使能开关。

取值范围:true,false

缺省值:true

id

String

网络ACL规则ID。

进行更新规则时,如果operate_type为add,则该值为空。

ip_version

Integer

IP协议版本

取值范围:4, 表示ipv4;6, 表示ipv6

name

String

网络ACL规则名称。

最小长度:0

最大长度:64

operate_type

String

网络ACL规则操作状态,作为请求时取值为"add"/"modify"/"delete",作为返回值时为"normal"。 当请求更新规则时,本参数值为delete时,除id之外,本请求体其他参数均可为空。

protocol

String

IP协议,为any时代表所有协议

取值范围: icmp,tcp,udp,icmpv6,any

source_ip_address

String

源IP地址,IPv4或IPv6的CIDR格式

source_port

String

源地端口范围

取值范围:整数,比如80,或者以"-"隔开的范围,比如80-90

请求示例

GET https://{endpoint}/v1/firewalls

响应示例

状态码: 200

OK

{
  "firewalls" : [ {
    "id" : "abbd0eb8-6821-11ea-bf82-00e04c9bd2a3",
    "domain_id" : "2b76febbe5d34eac85d26435c1f15809",
    "name" : "test",
    "description" : "test",
    "admin_state_up" : true,
    "status" : "INACTIVE",
    "ingress_firewall_policy" : {
      "id" : "6bb6515e-516a-4ec8-9120-b1775de6cc0e"
    },
    "egress_firewall_policy" : {
      "id" : "cc3f3145-6628-5d1b-81e4-449b2eac251e"
    },
    "ingress_firewall_rule_count" : 0,
    "egress_firewall_rule_count" : 0
  } ],
  "count" : 1
}

状态码

状态码

描述

200

OK

错误码

请参见错误码

分享:

    相关文档

    相关产品