Last updated: 2019-11-29 17:18:20


1. API Description

Domain name for API request:

This API (DescribeVpcs) is used to query the VPC list.

A maximum of 100 requests can be initiated per second for this API.

Note: This API supports Finance regions. Since Finance regions and non-Finance regions are isolated and not interconnected. If the common parameter Region is a Finance region (such as ap-shanghai-fsi), you need to specify a domain name containing the Finance region that should be identical to the value of Region field, for example:

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeVpcs
Version Yes String Common parameter. The value used for this API: 2017-03-12
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
VpcIds.N No Array of String VPC instance ID. such as vpc-f49l6u0z. A maximum of 100 instances are allowed for each request. This parameter does not support specifying both VpcIds and Filters.
Filters.N No Array of Filter Filter condition. This parameter does not support specifying both VpcIds and Filters.
  • vpc-name - String - (Filter condition) VPC instance name.
  • is-default - String - (Filter condition) Indicates whether it is the default VPC.
  • vpc-id - String - (Filter condition) VPC instance ID, such as vpc-f49l6u0z.
  • cidr-block - String - (Filter condition) VPC CIDR.
  • Offset No String Offset
    Limit No String Number of values to be returned

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Number of objects that meet the condition.
    VpcSet Array of Vpc VPC object.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Error Codes

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InvalidParameter.Coexist Parameters specified conflict with each other.
    InvalidParameterValue.Malformed Invalid input parameter format.
    ResourceNotFound Resource does not exist.

    5. Example

    Example 1 Query the VPC list

    Input example
    &<Common request parameters>

    Output example

      "Response": {
        "RequestId": "6a44afb7-0644-4ff9-9761-3502f99d3a15",
        "TotalCount": 2,
        "VpcSet": [
            "CidrBlock": "",
            "CreatedTime": "2018-04-25 10:26:26",
            "DhcpOptionsId": "dopt-8g7k5qfq",
            "DnsServerSet": [
            "DomainName": "",
            "EnableMulticast": false,
            "IsDefault": false,
            "VpcId": "vpc-p5sf61yj",
            "VpcName": "Test DHCP"
            "CidrBlock": "",
            "CreatedTime": "2017-04-17 15:41:07",
            "EnableMulticast": true,
            "IsDefault": true,
            "VpcId": "vpc-0akbol5v",
            "VpcName": "Default VPC"

    6. Other Resources

    Cloud API 3.0 comes with the following development tools to make it easier to call the API.