Queries the configuration information of a specified vSwitch by calling the DescribeVSwitchAttributes operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeVSwitchAttributes |
get |
*VSwitch
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| VSwitchId |
string |
Yes |
The ID of the vSwitch to query. |
vsw-25naue4g**** |
| RegionId |
string |
No |
The region ID of the VPC to which the route table belongs. You can call the DescribeRegions operation to query the region ID. |
cn-hangzhou |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The details of the vSwitch. |
||
| VpcId |
string |
The ID of the VPC to which the vSwitch belongs. |
vpc-257gq642n**** |
| Status |
string |
The status of the vSwitch. Valid values:
|
Pending |
| CreationTime |
string |
The time when the vSwitch was created. |
2021-08-22T10:40:25Z |
| IsDefault |
boolean |
Indicates whether the vSwitch is the default vSwitch. Valid values:
|
false |
| AvailableIpAddressCount |
integer |
The active IP address count. |
12 |
| NetworkAclId |
string |
The network ACL rules. |
1 |
| OwnerId |
integer |
The Alibaba Cloud account ID of the resource ownership. Important This value is of the Long type. Precision loss may occur in certain programming languages. Use this value with caution. |
28768383240243**** |
| VSwitchId |
string |
The ID of the vSwitch. |
vsw-25b7pv15t**** |
| RequestId |
string |
The request ID. |
7B48B4B9-1EAD-469F-B488-594DAB4B6A1A |
| CidrBlock |
string |
The private network address range of the vSwitch. |
192.168.0.1/24 |
| Description |
string |
The description of the vSwitch. |
abc |
| ResourceGroupId |
string |
The resource group ID. |
rg-acfmxazb4ph**** |
| ZoneId |
string |
The zone to which the vSwitch belongs. |
cn-beijing-a |
| Ipv6CidrBlock |
string |
The IPv6 CIDR block of the vSwitch. |
2408:XXXX:3c5:44e::/64 |
| VSwitchName |
string |
The name of the vSwitch. |
test |
| 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 |
| RouteTable |
object |
The route table information of the vSwitch. |
|
| RouteTableId |
string |
The ID of the route table associated with the vSwitch. |
vtb-bp145q7glnuzdv**** |
| RouteTableType |
string |
The type of the route table. Valid values:
|
System |
| Tags |
object |
||
| Tag |
array<object> |
The tag list. |
|
|
object |
The tag list. |
||
| Key |
string |
The tag key. |
FinanceDept |
| Value |
string |
The tag value. |
FinanceJoshua |
Examples
Success response
JSON format
{
"VpcId": "vpc-257gq642n****",
"Status": "Pending",
"CreationTime": "2021-08-22T10:40:25Z",
"IsDefault": false,
"AvailableIpAddressCount": 12,
"NetworkAclId": "1",
"OwnerId": 0,
"VSwitchId": "vsw-25b7pv15t****",
"RequestId": "7B48B4B9-1EAD-469F-B488-594DAB4B6A1A",
"CidrBlock": "192.168.0.1/24",
"Description": "abc",
"ResourceGroupId": "rg-acfmxazb4ph****",
"ZoneId": "cn-beijing-a",
"Ipv6CidrBlock": "2408:XXXX:3c5:44e::/64",
"VSwitchName": "test",
"ShareType": "Shared",
"EnabledIpv6": true,
"RouteTable": {
"RouteTableId": "vtb-bp145q7glnuzdv****",
"RouteTableType": "System"
},
"Tags": {
"Tag": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidVSwitchId.NotFound | Specified VSwitch can not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.