All Products
Search
Document Center

ENS:DescribeNetworks

Last Updated:Nov 18, 2024

Query the network list.

Operation description

  • You can call this operation up to 100 times per second.
  • You can call this operation up to 10 times per second per account.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ens:DescribeNetworksget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NetworkIdstringNo

The ID of the network.

n-5***
EnsRegionIdstringNo

The ID of the edge node.

cn-beijing-telecom
NetworkNamestringNo

The name of the network.

example
PageNumberintegerNo

The page number of the returned page. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 50. Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
TotalCountinteger

The total number of entries in the list.

3
PageSizeinteger

The number of entries returned on each page.

2
PageNumberinteger

The page number of the returned page.

1
Networksarray<object>

The list of networks.

Networkobject
EnsRegionIdstring

The ID of the edge node.

cn-beijing
NetworkIdstring

The ID of the network.

n-5***
NetworkNamestring

The name of the network.

example
CidrBlockstring

The IPv4 CIDR block of the network.

10.0.xx.xx/24
Statusstring

The status of the network. Valid values:

  • Pending
  • Available
Available
Descriptionstring

The description of the network.

exampleDescription
CreatedTimestring

The timestamp when the instance was created. Unit: milliseconds.

2020-06-16T06:33:15Z
VSwitchIdsarray

The list of vSwitches in the network.

VSwitchIdstring

The list of vSwitches in the network.

vsw-bp1nhbnpv2blyz8dl****
RouterTableIdstring

The route table ID.

rtb-5**
NetworkAclIdstring

The ID of the network access control list (ACL).

nacl-a2do9e413e0spxscd****

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TotalCount": 3,
  "PageSize": 2,
  "PageNumber": 1,
  "Networks": {
    "Network": [
      {
        "EnsRegionId": "cn-beijing",
        "NetworkId": "n-5***",
        "NetworkName": "example",
        "CidrBlock": "10.0.xx.xx/24",
        "Status": "Available",
        "Description": "exampleDescription",
        "CreatedTime": "2020-06-16T06:33:15Z",
        "VSwitchIds": {
          "VSwitchId": [
            "vsw-bp1nhbnpv2blyz8dl****"
          ]
        },
        "RouterTableId": "rtb-5**",
        "NetworkAclId": "nacl-a2do9e413e0spxscd****"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
400ens.interface.errorAn error occurred while calling the API.
400NoPermissionPermission denied.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history