Queries the configurations of a VSwitch.

Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String Yes DescribeVSwitchAttributes

The name of this action. Value: DescribeVSwitchAttributes.

RegionId String Yes cn-hangzhou

The ID of the region to which the VSwitch belongs. To query the region ID, call DescribeRegions.

VSwitchId String Yes vsw-25naue4g****

The ID of the VSwitch to be queried.

DryRun Boolean No false

Indicates whether to check this request only. Valid values:

  • true: Sends a check request without querying the resource status. The system checks whether the AccessKey is valid, whether the RAM user is authorized, and whether the required parameters are set. If the check fails, corresponding errors are returned. If the check succeeds, the error code DryRunOperation is returned.
  • false (default): Sends a normal request, returns the 2XX HTTP status code after the check, and queries the resource status directly.

Response parameters

Parameter Type Example value Description
AvailableIpAddressCount Long 12

The number of available IP addresses.

CidrBlock String

The IPv4 CIDR block of the VSwitch.

CreationTime String 2017-08-22T10:40:25Z

The creation time of the VSwitch.

Description String abc

The description of the VSwitch.

Ipv6CidrBlock String 2408:4004:0:6axx::/56

The IPv6 CIDR block of the VSwitch.

IsDefault Boolean false

Indicates whether the VSwitch is a default VSwitch.

  • true: The specified VSwitch is a default VSwitch.
  • false: The specified VSwitch is not a default VSwitch.
RequestId String 7B48B4B9-1EAD-469F-B488-594DAB4B6A1A

The ID of the request.

ResourceGroupId String rg-acfmxazb4pbgfh****

The ID of the resource group.


The route table information of the VSwitch.

RouteTableId String vtb-bp145q7glnuzdv****

The ID of the route table associated with the VSwitch.

RouteTableType String System

The type of the route table associated with the VSwitch. Valid values:

  • System: System route table.
  • Custom: Custom route table.
Status String Pending

The status of the VSwitch. Valid values:

  • Pending: The VSwitch is being configured.
  • Available: The VSwitch is available.
VSwitchId String vsw-25b7pcdfvv15t****

The ID of the VSwitch.

VSwitchName String  test

The name of the VSwitch.

VpcId String  vpc-257gqcfv642n****

The ID of the VPC to which the VSwitch belongs.

ZoneId String  cn-beijing-a

The zone to which the VSwitch belongs.


Request example


Response example

XML format


JSON format



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