Skip to main content

DescribeVSwitchAttributes

Description

call the DescribeVSwitchAttributes interface to query the configuration information of the switch.

Request Method

POST

Request Path

/apsara/route/Vpc/DescribeVSwitchAttributes

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
regionIdBODYstringYesNo sample value for this parameter.region id
VSwitchIdBODYstringYesvsw-25naue4g****ID of the switch to query configuration information.
DryRunBODYbooleanNofalsewhether to precheck only this request, value: true: sends a check request and does not query the resource status. Check items include whether the AccessKey is valid, the authorization status of RAM users, and whether required parameters are filled in. If the check fails, the corresponding error is returned. If the check passes, error code DryRunOperation will be returned. false(default): send a normal request, return a 2xx HTTP status code after checking and directly query the resource status.
RegionIdBODYstringYescn-qingdao-env17-d01the region ID of the switch to query configuration information. You can obtain the region ID by calling the DescribeRegions interface.
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
IsDefaultbooleanfalseis it the default switch. true: is the default switch. false(default): non-default switch.
StatusstringPendingstatus of the switch, value: Pending: under configuration. Available: available.
Descriptionstringabcdescription of the switch.
RouteTableIdstringvtb-bp145q7glnuzdv****ID of the routing table associated with the switch.
NetworkAclIdstringnacl-2zesich96aa37rl29****ID of the network ACL bound to the switch.
RequestIdstring7B48B4B9-1EAD-469F-B488-594DAB4B6A1Arequest ID.
ResourceGroupIdstringrg-acfmxazb4pbgfh****resource group ID.
ZoneIdstringcn-qingdao-env17-amtest11001-athe zone ID to which the switch belongs.
AvailableIpAddressCountlong12number of available IP.
VSwitchIdstringvsw-25b7pcdfvv15t****the ID of the switch.
CidrBlockstring192.168.0.1/24IPv4 network segment of the switch.
ResourceTypestringVSwitchresource type under VPC. VSwitch: switch. VRouter: router. RouteTable: routing table.
RouteTableTypestringSystemtype of routing table associated with the switch: System: system routing table. Custom: Custom routing table.
CloudResourceSetTypeNo sample value for this parameter.No description for this parameter.
RouteTablestructNo sample value for this parameter.the routing table information of the switch.
IsCgwbooleanfalseis it a user gateway. true: is the user gateway. false(default): non-user gateway.
OwnerIdlong12345678ID of the account to which the switch belongs.
VpcIdstringvpc-257gqcfv642n****VPC ID to which the switch belongs.
ResourceCountinteger1the number of resources under VPC.
CreationTimestring2017-08-22T10:40:25Zthe creation time of the switch.
VSwitchNamestringtestswitch name.
Ipv6CidrBlockstring2408:XXXX:0:2900::/64IPv6 network segment of the switch.
CloudResourcesarray of cloudresourcesettypeNo sample value for this parameter.resource list under VPC.

Example

Successful Response example

{
"IsDefault":"false",
"Status":"Pending",
"Description":"abc",
"RouteTableId":"vtb-bp145q7glnuzdv****",
"NetworkAclId":"nacl-2zesich96aa37rl29****",
"RequestId":"7B48B4B9-1EAD-469F-B488-594DAB4B6A1A",
"ResourceGroupId":"rg-acfmxazb4pbgfh****",
"ZoneId":"cn-qingdao-env17-amtest11001-a",
"AvailableIpAddressCount":"12",
"VSwitchId":"vsw-25b7pcdfvv15t****",
"CidrBlock":"192.168.0.1/24",
"ResourceType":"VSwitch",
"RouteTableType":"System",
"CloudResourceSetType":"",
"RouteTable":"",
"IsCgw":"false",
"OwnerId":"12345678",
"VpcId":"vpc-257gqcfv642n****",
"ResourceCount":"1",
"CreationTime":"2017-08-22T10:40:25Z",
"VSwitchName":"test",
"Ipv6CidrBlock":"2408:XXXX:0:2900::/64",
"CloudResources":""
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}