Queries virtual private clouds (VPCs). This operation is applicable to Elastic Compute Service (ECS) clusters and Kubernetes clusters.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only the common request header. For more information, see Common parameters for API calls.

Request syntax

GET /pop/v5/vpc_list HTTP/1.1

Request parameters

No request parameters.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

Message String success

The returned message.

RequestId String b197-40ab-9155-7ca7

The ID of the request.

VpcList Array of VpcEntity

The list of VPCs.

VpcEntity
EcsNum Integer 0

The number of ECS instances associated with the VPC.

Expired Boolean false

Indicates whether the VPC is available. Valid values:

  • true: The VPC is available.
  • false: The VPC is unavailable.
RegionId String cn-shenzhen

The ID of the region.

UserId String edas_****_test@aliyun-****.com

The ID of the user.

VpcId String vpc-wz9pcq3jofczwpujq****

VPC ID

VpcName String edas-default-vpc4

The name of the VPC.

Examples

Sample requests

GET /pop/v5/vpc_list HTTP/1.1
Common request header

Sample success responses

XML format

<Message>success</Message>
<VpcList>
    <VpcEntity>
        <VpcName>public_auto_test_vpc_</VpcName>
        <Expired>false</Expired>
        <RegionId>cn-shenzhen</RegionId>
        <UserId>edas_****_test@aliyun-****.com</UserId>
        <EcsNum>2</EcsNum>
        <VpcId>vpc-wz90fbqjyyvxznxpy****</VpcId>
    </VpcEntity>
    <VpcEntity>
        <VpcName>edas-default-vpc2</VpcName>
        <Expired>false</Expired>
        <RegionId>cn-shenzhen</RegionId>
        <UserId>edas_****_test@aliyun-****.com</UserId>
        <EcsNum>8</EcsNum>
        <VpcId>vpc-wz90iikh8t4kdlwlj****</VpcId>
    </VpcEntity>
</VpcList>
<Code>200</Code>

JSON format

{
	"Message": "success",
	"VpcList": {
		"VpcEntity": [
			{
				"VpcName": "public_auto_test_vpc_",
				"Expired": false,
				"RegionId": "cn-shenzhen",
				"UserId": "edas_****_test@aliyun-****.com",
				"EcsNum": 2,
				"VpcId": "vpc-wz90fbqjyyvxznxpy****"
			},
			{
				"VpcName": "edas-default-vpc2",
				"Expired": false,
				"RegionId": "cn-shenzhen",
				"UserId": "edas_****_test@aliyun-****.com",
				"EcsNum": 8,
				"VpcId": "vpc-wz90iikh8t4kdlwlj****"
			}
		]
	},
	"Code": 200
}

Error codes

For a list of error codes, visit the API Error Center.