Docs
api
Private Network(UVPC)
DescribeNetworkAcl

Obtain Network ACL - DescribeNetworkAcl

Overview

Obtain Network ACL

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeNetworkAcl.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
OffsetintList OffsetNo
LimitstringLimit on the number of lists retrievedNo
VpcIdstringThe ID of the VPC that the ACL to be obtained belongs to.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
AclListarray[AclInfo]Information of ACL, see the specific structure below at AclInfoYes

Data Model

AclInfo

Field NameTypeDescription InformationRequired
VpcIdstringVPC ID to which the ACL belongsYes
AclIdstringACL's IDYes
AclNamestringNameYes
DescriptionstringDescriptionYes
Entriesarray[AclEntryInfo]All rulesYes
Associationsarray[AssociationInfo]All binding relationships, see AssociationInfo below for specific structure.Yes
CreateTimeintCreated Unix TimestampYes
UpdateTimeintModified Unix TimestampYes

AclEntryInfo

Field NameTypeDescription InformationRequired
EntryIdstringEntry's IDYes
PrioritystringPriorityYes
DirectionstringOutbound or InboundYes
IpProtocolstringTargeted IP ProtocolYes
CidrBlockstringCIDR Information of IP RangeYes
PortRangestringSegment Information of PortYes
EntryActionstringAction of Matching RulesYes
TargetTypeintApplication target type. 0 represents 'All resources within the subnet', 1 represents 'Specified resources within the subnet'.Yes
CreateTimeintCreated Unix TimestampYes
UpdateTimeintModified Unix TimestampYes
TargetResourceListarray[TargetResourceInfo]Application target resource information. This value is not returned when TargetType is 0. See the specific structure below in TargetResourceInfo.No
TargetResourceCountintThe number of target application resources. This value is not returned when TargetType is 0.No

AssociationInfo

Field NameTypeDescription InformationRequired
AssociationIdstringBind IDYes
AclIdstringACL's IDYes
SubnetworkIdstringBound Subnet IDYes
CreateTimeintCreated Unix TimestampYes

TargetResourceInfo

Field NameTypeDescription InformationRequired
SubnetworkIdstringSubnet IDYes
ResourceNamestringResource NameYes
ResourceIdstringResource IDYes
ResourceTypeintResource TypeYes
SubResourceNamestringThe name of the virtual network card bound to the resourceYes
SubResourceIdstringID of the virtual network card bound to the resourceYes
SubResourceTypeintThe type of resource bound to the virtual network cardYes
PrivateIpstringIntranet IP of the ResourceYes

Example

Request Example

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

Response Example

{
  "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
}