All Products
Search
Document Center

Alibaba Cloud Service Mesh:DescribeVpcs

Last Updated:Jan 07, 2025

Queries the virtual private clouds (VPCs) that are available in a specified region.

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
servicemesh:DescribeVpcsget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountinteger

The total number of entries returned. By default, this parameter is not returned.

10
RequestIdstring

The request ID.

BD65C0AD-D3C6-48D3-8D93-38D2015C****
NextTokenstring

The token that marks the end of the current returned page. If this parameter is empty, it indicates that you have retrieved all the data.

""
MaxResultsinteger

The maximum number of entries returned on a single page.

10
Vpcsarray<object>

The list of VPCs that are available in the specified region.

Vpcsobject
VpcIdstring

The ID of a VPC.

vpc-bp1qkf2o3xmqc2519****
VpcNamestring

The name of the VPC.

vpc-test
Statusstring

The status of the VPC. Valid values:

  • Pending: The VPC is being configured.
  • Available: The VPC is available for use.
Available
IsDefaultboolean

Indicates whether the VPC is the default VPC in the specified region. Valid values:

  • true: yes
  • false: no
false

Examples

Sample success responses

JSONformat

{
  "TotalCount": 10,
  "RequestId": "BD65C0AD-D3C6-48D3-8D93-38D2015C****",
  "NextToken": "\"\"",
  "MaxResults": 10,
  "Vpcs": [
    {
      "VpcId": "vpc-bp1qkf2o3xmqc2519****",
      "VpcName": "vpc-test",
      "Status": "Available",
      "IsDefault": false
    }
  ]
}

Error codes

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