Obtain Network ACL - DescribeNetworkAcl
Overview
Obtain Network ACL
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is DescribeNetworkAcl . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
Offset | int | List Offset | No |
Limit | string | Limit on the number of lists retrieved | No |
VpcId | string | The ID of the VPC that the ACL to be obtained belongs to. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
AclList | array[AclInfo] | Information of ACL, see the specific structure below at AclInfo | Yes |
Data Model
AclInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
VpcId | string | VPC ID to which the ACL belongs | Yes |
AclId | string | ACL's ID | Yes |
AclName | string | Name | Yes |
Description | string | Description | Yes |
Entries | array[AclEntryInfo] | All rules | Yes |
Associations | array[AssociationInfo] | All binding relationships, see AssociationInfo below for specific structure. | Yes |
CreateTime | int | Created Unix Timestamp | Yes |
UpdateTime | int | Modified Unix Timestamp | Yes |
AclEntryInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
EntryId | string | Entry's ID | Yes |
Priority | string | Priority | Yes |
Direction | string | Outbound or Inbound | Yes |
IpProtocol | string | Targeted IP Protocol | Yes |
CidrBlock | string | CIDR Information of IP Range | Yes |
PortRange | string | Segment Information of Port | Yes |
EntryAction | string | Action of Matching Rules | Yes |
TargetType | int | Application target type. 0 represents 'All resources within the subnet', 1 represents 'Specified resources within the subnet'. | Yes |
CreateTime | int | Created Unix Timestamp | Yes |
UpdateTime | int | Modified Unix Timestamp | Yes |
TargetResourceList | array[TargetResourceInfo] | Application target resource information. This value is not returned when TargetType is 0. See the specific structure below in TargetResourceInfo. | No |
TargetResourceCount | int | The number of target application resources. This value is not returned when TargetType is 0. | No |
AssociationInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
AssociationId | string | Bind ID | Yes |
AclId | string | ACL's ID | Yes |
SubnetworkId | string | Bound Subnet ID | Yes |
CreateTime | int | Created Unix Timestamp | Yes |
TargetResourceInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
SubnetworkId | string | Subnet ID | Yes |
ResourceName | string | Resource Name | Yes |
ResourceId | string | Resource ID | Yes |
ResourceType | int | Resource Type | Yes |
SubResourceName | string | The name of the virtual network card bound to the resource | Yes |
SubResourceId | string | ID of the virtual network card bound to the resource | Yes |
SubResourceType | int | The type of resource bound to the virtual network card | Yes |
PrivateIp | string | Intranet IP of the Resource | Yes |
Example
Request Example
https://api.surfercloud.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
}