Call DescribeVSwitches to obtain the list of user switches.


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 parameter

Parameter Type Required Example Description
Action String Yes DescribeVSwitches

The operation that you want to perform. The operation that you want to perform. Set the value to DescribeVSwitches.

RegionId String Yes cn-hangzhou

The region ID of the vSwitch to be queried.

VpcId String No vpc-25cdvfeq58pl****

The ID of the VPC to which the vSwitch to be queried belongs.

PageNumber Integer No. 1

The page number of the vSwitch list. Default value: 1. Valid values: 1 to 100.

PageSize Integer No. 10

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

ZoneId String No cn-hangzhou-d

The ID of the zone to which the vSwitch to be queried belongs.

Response parameters

Element Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83B

The ID of the request.

VSwitches Object

The result of the vSwitch array.

VSwitch Array of VSwitch

The details about the vSwitch.

Status String Available

The status of the vSwitch. Valid values:

  • Pending: The instance is being configured.
  • Available: The image is available.
VSwitchId String vsw-25bcdxs7pv1****

The ID of the vSwitch.

IsDefault Boolean true

Indicates whether the vSwitch is the default vSwitch. Valid values:

  • true: It is the default vSwitch.
  • false: The vSwitch is not the default vSwitch.
CidrBlock String

The IPv4 CIDR block of the vSwitch.

GmtCreate String 2022-01-18T12:43:57Z

The time when the vSwitch was created.

VSwitchName String vswitch

Indicates the name of the vSwitch.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83B",
  "VSwitches" : {
    "VSwitch" : [ {
      "Status" : "Available",
      "VSwitchId" : "vsw-25bcdxs7pv1****",
      "IsDefault" : true,
      "CidrBlock" : "",
      "GmtCreate" : "2022-01-18T12:43:57Z",
      "VSwitchName" : "vswitch"
    } ]

Error code

For a list of error codes, see Service error codes.