查询ACL详情
更新时间:2025-08-05
接口描述
本接口用来查询ACL详情。
请求结构
                Plain Text
                
            
            1GET /v1/vpc/acl/detail?vpcId={vpcId} HTTP/1.1
2Host: bec.baidubce.com
3Authorization: authorization string请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 | 
|---|---|---|---|---|
| vpcId | String | 否 | Query参数 | VPC ID | 
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 描述 | 
|---|---|---|
| acl | AclVo | ACL详情 | 
请求示例
                Plain Text
                
            
            1GET /v1/vpc/acl/detail?vpcId=vpc-djn3wxpu HTTP/1.1
2Host: bec.baidubce.com     
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2021-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4    返回示例
                Plain Text
                
            
            1HTTP/1.1 200 OK
2x-bce-request-id: 7e789a40-adac-414a-8bd4-916d6be61112
3Date: Mon, 02 Apr 2018 08:14:25 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6{
7    "result":{
8        "acl":{
9            "aclEntrys":[
10                {
11                    "aclRules":[
12                        {
13                            "aclId":"acl-vc07ez6b",
14                            "aclRuleId":"ar-5tvhbeb5",
15                            "action":"allow",
16                            "description":"",
17                            "destinationIpAddress":"192.168.0.0/16",
18                            "destinationPort":"0-65535",
19                            "direction":"ingress",
20                            "etherType":"IPv4",
21                            "isDefault":false,
22                            "position":1,
23                            "protocol":"all",
24                            "sourceIpAddress":"0.0.0.0/0",
25                            "sourcePort":"0-65535",
26                            "subnetId":"sbn-lv6crppu",
27                            "vpcId":"vpc-djn3wxpu"
28                        },
29                        {
30                            "action":"allow",
31                            "description":"默认",
32                            "destinationIpAddress":"0.0.0.0/0",
33                            "destinationPort":"0-65535",
34                            "direction":"ingress",
35                            "etherType":"IPv4",
36                            "isDefault":true,
37                            "position":32769,
38                            "protocol":"all",
39                            "sourceIpAddress":"0.0.0.0/0",
40                            "sourcePort":"0-65535",
41                            "subnetId":"sbn-lv6crppu"
42                        },
43                        {
44                            "action":"allow",
45                            "description":"默认",
46                            "destinationIpAddress":"0.0.0.0/0",
47                            "destinationPort":"0-65535",
48                            "direction":"egress",
49                            "etherType":"IPv4",
50                            "isDefault":true,
51                            "position":32769,
52                            "protocol":"all",
53                            "sourceIpAddress":"0.0.0.0/0",
54                            "sourcePort":"0-65535",
55                            "subnetId":"sbn-lv6crppu"
56                        }
57                    ],
58                    "subnetCidr":"192.168.0.0/16",
59                    "subnetDescription":"",
60                    "subnetId":"sbn-lv6crppu",
61                    "subnetName":"subnet-test-hangzhou-m-230"
62                }
63            ],
64            "aclId":"acl-vc07ez6b",
65            "aclName":"默认ACL",
66            "city":"HANGZHOU",
67            "region":"EAST_CHINA",
68            "regionId":"cn-hangzhou-cm",
69            "serviceProvider":"CHINA_MOBILE",
70            "vpcCidr":"192.168.0.0/16",
71            "vpcId":"vpc-djn3wxpu",
72            "vpcName":"vpc-test-hangzhou-m-156"
73        }
74    },
75    "success":true
76}错误码
请参照错误返回章节的内容。
Model对象定义
AclVo
| 参数名称 | 类型 | 描述 | 
|---|---|---|
| aclId | String | ACL ID | 
| aclName | String | ACL名称 | 
| vpcId | String | VPC ID | 
| vpcName | String | VPC名称 | 
| vpcCidr | String | VPC 网段及子网掩码CIDR | 
| subnetCount | Integer | 子网数量 | 
| region | String | 地域 | 
| serviceProvider | String | 运营商 | 
| city | String | 城市 | 
| regionId | String | 节点ID | 
| aclEntrys | List<AclEntryVo> | ACL的Entry列表 | 
AclEntryVo
| 参数名称 | 类型 | 描述 | 
|---|---|---|
| subnetId | String | 子网ID | 
| subnetName | String | 子网名称 | 
| subnetCidr | String | 子网CIDR | 
| subnetDescription | String | 子网描述 | 
| aclEntrys | List<AclRuleVo> | ACL规则集合 | 
AclRuleVo
| 参数名称 | 类型 | 描述 | 
|---|---|---|
| aclRuleId | String | ACL规则ID | 
| aclId | String | ACL ID | 
| vpcId | String | VPC ID | 
| subnetId | String | 子网ID | 
| description | String | ACL规则描述 | 
| protocol | String | 协议,包括all、tcp、udp、icmp。all表示tcp、udp、icmp | 
| sourceIpAddress | String | 源IP | 
| destinationIpAddress | String | 目的IP | 
| sourcePort | String | 源端口,取值范围0-65535。 可以是端口范围,例如1-65535,或单个端口,例如8080 | 
| destinationPort | String | 目的端口,取值范围0-65535。 可以是端口范围,例如1-65535,或单个端口,例如8080 | 
| position | Integer | 优先级,取值1-32768,且不能与已有条目重复。数值越小,优先级越高,规则匹配顺序为按优先级由高到低匹配 | 
| direction | String | 方向。入站ingress,出站egress | 
| etherType | String | IP类型,取值IPv4、IPv6 | 
| action | String | 策略。允许allow,拒绝deny | 
| isDefault | Boolean | 是否默认规则。是:true,否:false | 
