Queries networkable information. Internal networking is performed by vSwitch.
Operation description
The DescribeVSwitches operation may return the Throttling.DeepPageSkip error code during frequent deep paging or page skipping. Reduce the query frequency or use sequential paging.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeVSwitches |
list |
*VSwitch
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| VpcId |
string |
No |
The ID of the VPC to which the vSwitches that you want to query belong. Note
Specify at least one of the RegionId and VpcId parameters. |
vpc-25cdvfeq58pl**** |
| VSwitchId |
string |
No |
The ID of the vSwitch that you want to query. |
vsw-23dscddcffvf3**** |
| ZoneId |
string |
No |
The ID of the zone to which the vSwitch belongs. You can call the DescribeZones operation to query the zone ID. |
cn-hangzhou-d |
| RegionId |
string |
No |
The ID of the region to which the vSwitch belongs. You can call the DescribeRegions operation to query the region ID. Note
Specify at least one of the RegionId and VpcId parameters. |
cn-hangzhou |
| VSwitchName |
string |
No |
The name of the vSwitch. The name must be 1 to 128 characters in length and cannot start with |
vSwitch |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
true |
| IsDefault |
boolean |
No |
Specifies whether to query the default vSwitch in the specified region. Valid values:
If you do not specify this parameter, the system queries all vSwitches in the specified region. |
true |
| RouteTableId |
string |
No |
The ID of the route table. |
vtb-bp145q7glnuzdvzu2**** |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the vSwitch belongs. |
rg-bp67acfmxazb4ph**** |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page for paging queries. Maximum value: 50. Default value: 10. |
10 |
| VSwitchOwnerId |
integer |
No |
The Alibaba Cloud account ID of the resource ownership. |
2546073170691**** |
| EnableIpv6 |
boolean |
No |
Specifies whether to query vSwitches that have IPv6 CIDR blocks enabled in the specified region. Valid values:
If you do not specify this parameter, the system queries all vSwitches in the specified region. |
false |
| Tag |
array<object> |
No |
The tags of the resource. |
|
|
object |
No |
The tag. |
||
| Key |
string |
No |
The tag key of the resource. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with |
FinanceDept |
| Value |
string |
No |
The tag value of the resource. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with |
FinanceJoshua |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageSize |
integer |
The number of entries per page. |
10 |
| RequestId |
string |
The request ID. |
9A572171-4E27-40D1-BD36-D26C9E71E29E |
| PageNumber |
integer |
The page number. |
1 |
| TotalCount |
integer |
The total number of entries returned. |
1 |
| VSwitches |
object |
||
| VSwitch |
array<object> |
The details of the vSwitches. |
|
|
array<object> |
The vSwitch struct. |
||
| VpcId |
string |
The ID of the VPC to which the vSwitch belongs. |
vpc-257gcdcdq64**** |
| Status |
string |
The status of the vSwitch. Valid values:
|
Available |
| CreationTime |
string |
The time when the vSwitch was created. |
2022-01-18T12:43:57Z |
| IsDefault |
boolean |
Indicates whether the vSwitch is the default vSwitch. Valid values:
|
true |
| AvailableIpAddressCount |
integer |
The number of available IP addresses in the vSwitch. |
1 |
| NetworkAclId |
string |
The ID of the network ACL. |
nacl-a2do9e413e0spzasx**** |
| OwnerId |
integer |
The Alibaba Cloud account ID of the resource ownership. |
25346073170691**** |
| VSwitchId |
string |
The ID of the vSwitch. |
vsw-25bcdxs7pv1**** |
| CidrBlock |
string |
The IPv4 CIDR block of the vSwitch. |
172.16.0.0/24 |
| Description |
string |
The description of the vSwitch. |
VSwitchDescription |
| ResourceGroupId |
string |
The ID of the resource group to which the vSwitch belongs. |
rg-acfmxazb4ph6aiy**** |
| ZoneId |
string |
The zone to which the vSwitch belongs. |
cn-hangzhou-d |
| Ipv6CidrBlock |
string |
The IPv6 CIDR block of the vSwitch. |
2408:4002:10c4:4e03::/64 |
| VSwitchName |
string |
The name of the vSwitch. |
vSwitch |
| ShareType |
string |
The sharing type of the vSwitch.
|
Shared |
| EnabledIpv6 |
boolean |
Indicates whether the IPv6 CIDR block is enabled for the vSwitch. Valid values:
|
true |
| Tags |
object |
||
| Tag |
array<object> |
The tag information of the vSwitch. |
|
|
object |
The tag information struct. |
||
| Key |
string |
The tag key of the vSwitch. |
department |
| Value |
string |
The tag value of the vSwitch. |
dev |
| RouteTable |
object |
The route table information. |
|
| RouteTableId |
string |
The ID of the route table associated with the vSwitch. |
vrt-bp145q7glnuzdv**** |
| RouteTableType |
string |
The type of the route table associated with the vSwitch. Valid values:
|
System |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "9A572171-4E27-40D1-BD36-D26C9E71E29E",
"PageNumber": 1,
"TotalCount": 1,
"VSwitches": {
"VSwitch": [
{
"VpcId": "vpc-257gcdcdq64****",
"Status": "Available",
"CreationTime": "2022-01-18T12:43:57Z",
"IsDefault": true,
"AvailableIpAddressCount": 1,
"NetworkAclId": "nacl-a2do9e413e0spzasx****",
"OwnerId": 0,
"VSwitchId": "vsw-25bcdxs7pv1****",
"CidrBlock": "172.16.0.0/24",
"Description": "VSwitchDescription",
"ResourceGroupId": "rg-acfmxazb4ph6aiy****",
"ZoneId": "cn-hangzhou-d",
"Ipv6CidrBlock": "2408:4002:10c4:4e03::/64",
"VSwitchName": "vSwitch",
"ShareType": "Shared",
"EnabledIpv6": true,
"Tags": {
"Tag": [
{
"Key": "department",
"Value": "dev"
}
]
},
"RouteTable": {
"RouteTableId": "vrt-bp145q7glnuzdv****",
"RouteTableType": "System"
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Forbidden.VpcNotFound | Specified VPC can not found. | The specified VPC does not exist. |
| 400 | InvalidTagKey | The tag keys are not valid. | The tag index is invalid. |
| 400 | InvalidTagValue | The tag values are not valid. | The tag value is invalid. |
| 400 | IellgalParameter.OwnerAccount | The specified parameter OwnerAccount is not valid. | The specified parameter OwnerAccount is illegal. |
| 400 | IllegalParam.OwnerId | The specified parameter VSwitchOwnerId is not valid. | |
| 400 | InvalidVpcIdNumber.NotSupported | The number of vpcIds exceeds the limit. | The value of the vpcId parameter has reached the upper limit. |
| 400 | InvalidVSwitchIdNumber.NotSupported | The number of vSwitchIds exceeds the limit. | |
| 400 | Throttling.DeepPageSkip | Deep page skip throttled. Please reduce the page skip frequency or use sequential pagination. | The number of deep pagination skip operations has triggered rate limiting. Reduce the frequency of deep page jumps, or use sequential paging. |
| 404 | InvalidVSwitchId.NotFound | VSwitch not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.