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
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
VSwitchId | BODY | string | Yes | vsw-25naue4g**** | ID of the switch to query configuration information. |
DryRun | BODY | boolean | No | false | whether 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. |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | the region ID of the switch to query configuration information. You can obtain the region ID by calling the DescribeRegions interface. |
version | BODY | string | No | 2016-01-01 | version of api |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
IsDefault | boolean | false | is it the default switch. true: is the default switch. false(default): non-default switch. |
Status | string | Pending | status of the switch, value: Pending: under configuration. Available: available. |
Description | string | abc | description of the switch. |
RouteTableId | string | vtb-bp145q7glnuzdv**** | ID of the routing table associated with the switch. |
NetworkAclId | string | nacl-2zesich96aa37rl29**** | ID of the network ACL bound to the switch. |
RequestId | string | 7B48B4B9-1EAD-469F-B488-594DAB4B6A1A | request ID. |
ResourceGroupId | string | rg-acfmxazb4pbgfh**** | resource group ID. |
ZoneId | string | cn-qingdao-env17-amtest11001-a | the zone ID to which the switch belongs. |
AvailableIpAddressCount | long | 12 | number of available IP. |
VSwitchId | string | vsw-25b7pcdfvv15t**** | the ID of the switch. |
CidrBlock | string | 192.168.0.1/24 | IPv4 network segment of the switch. |
ResourceType | string | VSwitch | resource type under VPC. VSwitch: switch. VRouter: router. RouteTable: routing table. |
RouteTableType | string | System | type of routing table associated with the switch: System: system routing table. Custom: Custom routing table. |
CloudResourceSetType | No sample value for this parameter. | No description for this parameter. | |
RouteTable | struct | No sample value for this parameter. | the routing table information of the switch. |
IsCgw | boolean | false | is it a user gateway. true: is the user gateway. false(default): non-user gateway. |
OwnerId | long | 12345678 | ID of the account to which the switch belongs. |
VpcId | string | vpc-257gqcfv642n**** | VPC ID to which the switch belongs. |
ResourceCount | integer | 1 | the number of resources under VPC. |
CreationTime | string | 2017-08-22T10:40:25Z | the creation time of the switch. |
VSwitchName | string | test | switch name. |
Ipv6CidrBlock | string | 2408:XXXX:0:2900::/64 | IPv6 network segment of the switch. |
CloudResources | array of cloudresourcesettype | No 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
}
}