查询ACL详情
更新时间:2022-05-17
接口描述
本接口用于查询ACL详情。
请求结构
Plain Text
1GET /v2/vpc/acl?vpcId={vpcId} HTTP/1.1
2Host: bec.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
vpcId | VPC ID | query | 是 | string |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 参数说明 | 类型 |
---|---|---|
aclEntrys | ACL列表 | List<BecAclEntry> |
aclRules | ACL规则列表 | List<BecAclRule> |
action | 策略。允许allow,拒绝deny | string |
description | 备注 | string |
destinationIpAddress | 目的IP | string |
destinationPort | 目的端口 | string |
direction | 方向。入站ingress,出站egress | string |
id | ACL规则ID | string |
position | 优先级。数值越小,优先级越高,规则匹配顺序为按优先级由高到低匹配 | integer |
protocol | 协议类型 | string |
sourceIpAddress | 源IP | string |
sourcePort | 源端口 | string |
subnetId | 子网ID | string |
subnetCidr | 子网CIDR | string |
subnetId | 子网ID | string |
subnetName | 子网名称 | string |
vpcCidr | VPC的CIDR | string |
vpcId | VPC ID | string |
vpcName | VPC名称 | string |
错误码
请参照错误返回章节的内容。
请求示例
Plain Text
1GET /v2/vpc/acl?vpcId=vpc-hvp0whyd HTTP/1.1
2Host: bec.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3Date: Wed, 08 Jul 2015 03:28:11 GMT
4x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
5Server: BWS
6
7{
8 "vpcId": "vpc-hvp0whyd",
9 "vpcName": "test-hz-1",
10 "vpcCidr": "10.0.0.0/8",
11 "aclEntrys": [
12 {
13 "subnetId": "sbn-qstqimne",
14 "subnetName": "test-hz-1-1",
15 "subnetCidr": "10.0.1.0/24",
16 "aclRules": [
17 {
18 "id": "ar-02qghmio",
19 "subnetId": "sbn-qstqimne",
20 "description": "",
21 "protocol": "all",
22 "sourceIpAddress": "0.0.0.0/0",
23 "destinationIpAddress": "10.0.1.0/24",
24 "sourcePort": "0-65535",
25 "destinationPort": "0-65535",
26 "position": 1,
27 "direction": "ingress",
28 "action": "allow"
29 },
30 {
31 "subnetId": "sbn-qstqimne",
32 "description": "默认",
33 "protocol": "all",
34 "sourceIpAddress": "0.0.0.0/0",
35 "destinationIpAddress": "0.0.0.0/0",
36 "sourcePort": "0-65535",
37 "destinationPort": "0-65535",
38 "position": 32769,
39 "direction": "ingress",
40 "action": "allow"
41 },
42 {
43 "subnetId": "sbn-qstqimne",
44 "description": "默认",
45 "protocol": "all",
46 "sourceIpAddress": "0.0.0.0/0",
47 "destinationIpAddress": "0.0.0.0/0",
48 "sourcePort": "0-65535",
49 "destinationPort": "0-65535",
50 "position": 32769,
51 "direction": "egress",
52 "action": "allow"
53 }
54 ]
55 },
56 {
57 "subnetId": "sbn-muyqspwc",
58 "subnetName": "23123",
59 "subnetCidr": "10.255.0.0/16",
60 "aclRules": [
61 {
62 "subnetId": "sbn-muyqspwc",
63 "description": "默认",
64 "protocol": "all",
65 "sourceIpAddress": "0.0.0.0/0",
66 "destinationIpAddress": "0.0.0.0/0",
67 "sourcePort": "0-65535",
68 "destinationPort": "0-65535",
69 "position": 32769,
70 "direction": "ingress",
71 "action": "allow"
72 },
73 {
74 "subnetId": "sbn-muyqspwc",
75 "description": "默认",
76 "protocol": "all",
77 "sourceIpAddress": "0.0.0.0/0",
78 "destinationIpAddress": "0.0.0.0/0",
79 "sourcePort": "0-65535",
80 "destinationPort": "0-65535",
81 "position": 32769,
82 "direction": "egress",
83 "action": "allow"
84 }
85 ]
86 }
87 ]
88}