Queries the configurations of a VSwitch.
Make the API call
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:
|
Response parameters
Parameter | Type | Example value | Description |
---|---|---|---|
AvailableIpAddressCount | Long | 12 |
The number of available IP addresses. |
CidrBlock | String | 192.168.0.1/24 |
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.
|
RequestId | String | 7B48B4B9-1EAD-469F-B488-594DAB4B6A1A |
The ID of the request. |
ResourceGroupId | String | rg-acfmxazb4pbgfh**** |
The ID of the resource group. |
RouteTable |
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:
|
Status | String | Pending |
The status of the VSwitch. Valid values:
|
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. |
Examples
Request example
https://vpc.aliyuncs.com/?Action=DescribeVSwitchAttributes
&VSwitchId=vsw-25nauecdfv4g****
&<CommonParameters>
Response example
XML
format
<DescribeVSwitchAttributesResponse>
<RouteTable>
<RouteTableId>vtb-hp3ngu1hkdutfakqn****</RouteTableId>
<RouteTableType>System</RouteTableType>
</RouteTable>
<Description></Description>
<IsDefault>false</IsDefault>
<AvailableIpAddressCount>251</AvailableIpAddressCount>
<ResourceGroupId>rg-acfmy45w7w2****</ResourceGroupId>
<ZoneId>cn-huhehaote-a</ZoneId>
<VSwitchId>vsw-hp3lyltb1dosj540y****</VSwitchId>
<VpcId>vpc-hp34hflqqsjh3a3q7****</VpcId>
<CreationTime>2019-01-07T04:54:14Z</CreationTime>
<Status>Available</Status>
<CidrBlock>192.168.0.0/24</CidrBlock>
<RequestId>A31F062D-81F0-48BC-9771-915D6622D26A</RequestId>
<VSwitchName>doc1</VSwitchName>
<Ipv6CidrBlock>2408:4004:0:2900::/64</Ipv6CidrBlock>
<CloudResources></CloudResources>
</DescribeVSwitchAttributesResponse>
JSON
format
{
"RouteTable":{
"RouteTableId":"vtb-hp3ngu1hkdutfakqn****",
"RouteTableType":"System"
},
"Description":"",
"IsDefault":false,
"AvailableIpAddressCount":251,
"ResourceGroupId":"rg-acfmy45w7w2****",
"ZoneId":"cn-huhehaote-a",
"VSwitchId":"vsw-hp3lyltb1dosj540y****",
"VpcId":"vpc-hp34hflqqsjh3a3q7****",
"CreationTime":"2019-01-07T04:54:14Z",
"Status":"Available",
"CidrBlock":"192.168.0.0/24",
"RequestId":"A31F062D-81F0-48BC-9771-915D6622D26A",
"Ipv6CidrBlock":"2408:4004:0:2900::/64",
"VSwitchName":"doc1",
"CloudResources":{
"CloudResourceSetType":[]
}
}
Errors
For a list of error codes, visit the API Error Center.