查询ACL详情
更新时间:2022-05-17
接口描述
本接口用于查询ACL详情。
请求结构
GET /v2/vpc/acl?vpcId={vpcId} HTTP/1.1
Host: bec.baidubce.com
Authorization: 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 |
错误码
请参照错误返回章节的内容。
请求示例
GET /v2/vpc/acl?vpcId=vpc-hvp0whyd HTTP/1.1
Host: bec.baidubce.com
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Wed, 08 Jul 2015 03:28:11 GMT
x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
Server: BWS
{
"vpcId": "vpc-hvp0whyd",
"vpcName": "test-hz-1",
"vpcCidr": "10.0.0.0/8",
"aclEntrys": [
{
"subnetId": "sbn-qstqimne",
"subnetName": "test-hz-1-1",
"subnetCidr": "10.0.1.0/24",
"aclRules": [
{
"id": "ar-02qghmio",
"subnetId": "sbn-qstqimne",
"description": "",
"protocol": "all",
"sourceIpAddress": "0.0.0.0/0",
"destinationIpAddress": "10.0.1.0/24",
"sourcePort": "0-65535",
"destinationPort": "0-65535",
"position": 1,
"direction": "ingress",
"action": "allow"
},
{
"subnetId": "sbn-qstqimne",
"description": "默认",
"protocol": "all",
"sourceIpAddress": "0.0.0.0/0",
"destinationIpAddress": "0.0.0.0/0",
"sourcePort": "0-65535",
"destinationPort": "0-65535",
"position": 32769,
"direction": "ingress",
"action": "allow"
},
{
"subnetId": "sbn-qstqimne",
"description": "默认",
"protocol": "all",
"sourceIpAddress": "0.0.0.0/0",
"destinationIpAddress": "0.0.0.0/0",
"sourcePort": "0-65535",
"destinationPort": "0-65535",
"position": 32769,
"direction": "egress",
"action": "allow"
}
]
},
{
"subnetId": "sbn-muyqspwc",
"subnetName": "23123",
"subnetCidr": "10.255.0.0/16",
"aclRules": [
{
"subnetId": "sbn-muyqspwc",
"description": "默认",
"protocol": "all",
"sourceIpAddress": "0.0.0.0/0",
"destinationIpAddress": "0.0.0.0/0",
"sourcePort": "0-65535",
"destinationPort": "0-65535",
"position": 32769,
"direction": "ingress",
"action": "allow"
},
{
"subnetId": "sbn-muyqspwc",
"description": "默认",
"protocol": "all",
"sourceIpAddress": "0.0.0.0/0",
"destinationIpAddress": "0.0.0.0/0",
"sourcePort": "0-65535",
"destinationPort": "0-65535",
"position": 32769,
"direction": "egress",
"action": "allow"
}
]
}
]
}