Skip to Content
私有网络 UVPC获取网络ACL - DescribeNetworkAcl

获取网络ACL - DescribeNetworkAcl

简介

获取网络ACL

定义

公共参数

参数名类型描述信息必填
Actionstring对应的 API 指令名称,当前 API 为 DescribeNetworkAclYes
PublicKeystring用户公钥,可从 控制台 获取Yes
Signaturestring根据公钥及 API 指令生成的用户签名,参见 签名算法Yes

请求参数

参数名类型描述信息必填
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口No
Offsetint列表偏移量No
Limitstring列表获取的个数限制No
VpcIdstring需要获取的ACL所属的VPC的IDNo

响应字段

字段名类型描述信息必填
RetCodeint返回状态码,为 0 则为成功返回,非 0 为失败Yes
Actionstring操作指令名称Yes
Messagestring返回错误消息,当 RetCode 非 0 时提供详细的描述信息No
AclListarray[AclInfo]ACL的信息,具体结构见下方AclInfoYes

数据模型

AclInfo

字段名类型描述信息必填
VpcIdstringACL所属的VPC IDYes
AclIdstringACL的IDYes
AclNamestring名称Yes
Descriptionstring描述Yes
Entriesarray[AclEntryInfo]所有的规则Yes
Associationsarray[AssociationInfo]所有的绑定关系,具体结构见下方AssociationInfoYes
CreateTimeint创建的Unix时间戳Yes
UpdateTimeint更改的Unix时间戳Yes

AclEntryInfo

字段名类型描述信息必填
EntryIdstringEntry的IDYes
Prioritystring优先级Yes
Directionstring出向或者入向Yes
IpProtocolstring针对的IP协议Yes
CidrBlockstringIP段的CIDR信息Yes
PortRangestringPort的段信息Yes
EntryActionstring匹配规则的动作Yes
TargetTypeint应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。Yes
CreateTimeint创建的Unix时间戳Yes
UpdateTimeint更改的Unix时间戳Yes
TargetResourceListarray[TargetResourceInfo]应用目标资源信息。TargetType为0时不返回该值。具体结构见下方TargetResourceInfoNo
TargetResourceCountint应用目标资源数量。TargetType为0时不返回该值。No

AssociationInfo

字段名类型描述信息必填
AssociationIdstring绑定IDYes
AclIdstringACL的IDYes
SubnetworkIdstring绑定的子网IDYes
CreateTimeint创建的Unix时间戳Yes

TargetResourceInfo

字段名类型描述信息必填
SubnetworkIdstring子网IDYes
ResourceNamestring资源名称Yes
ResourceIdstring资源IDYes
ResourceTypeint资源类型Yes
SubResourceNamestring资源绑定的虚拟网卡的名称Yes
SubResourceIdstring资源绑定的虚拟网卡的IDYes
SubResourceTypeint资源绑定虚拟网卡的类型Yes
PrivateIpstring资源内网IPYes

示例

请求示例

https://api-ajyun.cachecenter.com/?Action=DescribeNetworkAcl &Region=cn-bj &ProjectId=org-xxxxx &VpcId=uvnet-xxxxxx &Offset=2 &Limit=vTnIQqcI

响应示例

{ "AclList": [ { "AclId": "netacl-xxxxxx", "AclName": "sdfsdfsdf", "Associations": [ { "AclId": "netacl-xxxxxx", "AssociationId": "netaclassoc_xxxxxx", "CreateTime": 2, "SubnetworkId": "subnet-xxxxxx" } ], "CreateTime": 4, "Description": "", "Entries": [ { "CidrBlock": "0.0.0.0/0", "CreateTime": 1, "Description": "sdsdsd", "Direction": "Ingress", "EntryAction": "Accept", "EntryId": "netaclentry_xxxxxx", "IpProtocol": "TCP", "PortRange": "All", "Priority": "100", "TargetResourceCount": 0, "TargetResourceList": null, "TargetType": 0, "UpdateTime": 8 }, { "CidrBlock": "0.0.0.0/0", "CreateTime": 3, "Description": "sdsdsfd", "Direction": "Egress", "EntryAction": "Accept", "EntryId": "netaclentry_xxxxxx", "IpProtocol": "TCP", "PortRange": "All", "Priority": "1000", "TargetResourceCount": 0, "TargetResourceList": null, "TargetType": 0, "UpdateTime": 2 } ], "UpdateTime": 5, "VpcId": "uvnet-xxxxxx" }, { "AclId": "netacl-xxxxxx", "AclName": "DKLGHDhfdj", "Associations": null, "CreateTime": 1, "Description": "BVJDOIFdkf", "Entries": [ { "CidrBlock": "10.10.10.10/32", "CreateTime": 4, "Description": "vdfdgg", "Direction": "Egress", "EntryAction": "Reject", "EntryId": "netaclentry_xxxxxx", "IpProtocol": "TCP", "PortRange": "All", "Priority": "100", "TargetResourceCount": 0, "TargetResourceList": null, "TargetType": 0, "UpdateTime": 7 }, { "CidrBlock": "10.10.10.10/32", "CreateTime": 6, "Description": "uykj", "Direction": "Ingress", "EntryAction": "Reject", "EntryId": "netaclentry_xxxxxx", "IpProtocol": "TCP", "PortRange": "All", "Priority": "1000", "TargetResourceCount": 0, "TargetResourceList": null, "TargetType": 0, "UpdateTime": 9 } ], "UpdateTime": 3, "VpcId": "uvnet-xxxxxx" } ], "Action": "DescribeNetworkAclResponse", "RetCode": 0, "TotalCount": 2 }