Queries vSwitches in a virtual private cloud (VPC).
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. Note
You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| VpcId |
string |
No |
The virtual private cloud (VPC) ID. Note
You can call the DescribeDBClusters operation to query the VPC ID. |
vpc-bp13h7uzhulpuxvnp**** |
| ZoneId |
string |
No |
The zone ID. Note
You can call the DescribeRegions operation to query the most recent zone list. |
cn-hangzhou-h |
| VswId |
string |
No |
The vSwitch ID. |
vsw-8vbpu1teend1qcosfojlz |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
D65A809F-34CE-4550-9BC1-0ED21ETG380 |
| VSwitches |
object |
The vSwitches returned. |
|
| vSwitch |
array<object> |
The details of each vSwitch. |
|
|
object |
|||
| Status |
string |
The state of the vSwitch. Valid values: Pending: the vSwitch is being configured. Available: the vSwitch is available. |
Available |
| IsDefault |
boolean |
Indicates whether the vSwitch is the default vSwitch. Valid values: true: The vSwitch is the default vSwitch. false: The vSwitch is not the default vSwitch. |
false |
| VSwitchId |
string |
The vSwitch ID. |
vsw-25bcdxs7pv1**** |
| CidrBlock |
string |
The IPv4 CIDR block of the vSwitch. |
172.16.0.0/24 |
| RegionNo |
string |
The region ID of the vSwitch. |
cn-hangzhou |
| GmtCreate |
string |
The time when the vSwitch was created. |
2022-01-18T12:43:57Z |
| AliUid |
string |
The ID of the Resource Access Management (RAM) user. |
195813423043**** |
| GmtModified |
string |
The time when the vSwitch was modified. |
2022-01-22T12:43:57Z |
| Bid |
string |
The ID of the user channel. |
2**** |
| IzNo |
string |
The zone ID of the vSwitch. |
cn-hangzhou-k |
| VSwitchName |
string |
The name of the vSwitch. |
vswitch |
Examples
Success response
JSON format
{
"RequestId": "D65A809F-34CE-4550-9BC1-0ED21ETG380",
"VSwitches": {
"VSwitch": [
{
"Status": "Available",
"IsDefault": false,
"VSwitchId": "vsw-25bcdxs7pv1****",
"CidrBlock": "172.16.0.0/24",
"RegionNo": "cn-hangzhou",
"GmtCreate": "2022-01-18T12:43:57Z",
"AliUid": "195813423043****",
"GmtModified": "2022-01-22T12:43:57Z",
"Bid": "2****",
"IzNo": "cn-hangzhou-k",
"VSwitchName": "vswitch"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError | An error occurred while processing your request. | An internal error occurred. Please try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.