Queries the detailed information about a specified vSwitch.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeVSwitchAttributes

The operation that you want to perform. Set the value to DescribeVSwitchAttributes.

VSwitchIdStringYesvsw-25naue4g****

The ID of the vSwitch.

RegionIdStringNocn-hangzhou

The region ID of the virtual private cloud (VPC) to which the route table belongs.

You can call the DescribeRegions operation to query the most recent region list.

DryRunBooleanNofalse

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false (default): sends a request and performs a dry run. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.

Response parameters

ParameterTypeExampleDescription
VpcIdStringvpc-257gq642n****

The ID of the VPC to which the vSwitch belongs.

StatusStringPending

The status of the vSwitch. Valid values:

  • Pending
  • Available
CreationTimeString2021-08-22T10:40:25Z

The time when the vSwitch was created.

IsDefaultBooleanfalse

Indicates whether the vSwitch is the default vSwitch. Valid values:

  • true
  • false
AvailableIpAddressCountLong12

The number of available IP addresses.

NetworkAclIdString1

The network access control list (ACL) rules.

OwnerIdLong287683832402436789

The ID of the Alibaba Cloud account to which the vSwitch belongs.

VSwitchIdStringvsw-25b7pv15t****

The ID of the vSwitch.

RequestIdString7B48B4B9-1EAD-469F-B488-594DAB4B6A1A

The request ID.

CidrBlockString192.168.0.1/24

The CIDR block of the vSwitch.

DescriptionStringabc

The description of the vSwitch.

ResourceGroupIdStringrg-acfmxazb4ph****

The resource group ID.

ZoneIdStringcn-beijing-a

The ID of the zone to which the vSwitch belongs.

Ipv6CidrBlockString2408:XXXX:3c5:44e::/64

The IPv6 CIDR block of the vSwitch.

VSwitchNameStringtest

The name of the vSwitch.

ShareTypeStringShared

Indicates whether the vSwitch is shared.

  • If no value is returned, the vSwitch is a regular vSwitch.
  • If Shared is returned, the vSwitch is shared.
  • If Sharing is returned, the vSwitch is being shared.
RouteTableObject

The information about the route table that is associated with the vSwitch.

RouteTableIdStringvtb-bp145q7glnuzdv****

The ID of the route table that is associated with the vSwitch.

RouteTableTypeStringSystem

The type of the route table. Valid values:

  • System
  • Custom
TagsArray of Tag

The tag list.

Tag
KeyStringFinanceDept

The tag key.

ValueStringFinanceJoshua

The tag value.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeVSwitchAttributes
&VSwitchId=vsw-25naue4g****
&RegionId=cn-hangzhou
&DryRun=false
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeVSwitchAttributesResponse>
    <VpcId>vpc-257gq642n****</VpcId>
    <Status>Pending</Status>
    <CreationTime>2021-08-22T10:40:25Z</CreationTime>
    <IsDefault>false</IsDefault>
    <AvailableIpAddressCount>12</AvailableIpAddressCount>
    <NetworkAclId>1</NetworkAclId>
    <OwnerId>287683832402436800</OwnerId>
    <VSwitchId>vsw-25b7pv15t****</VSwitchId>
    <RequestId>7B48B4B9-1EAD-469F-B488-594DAB4B6A1A</RequestId>
    <CidrBlock>192.168.0.1/24</CidrBlock>
    <Description>abc</Description>
    <ResourceGroupId>rg-acfmxazb4ph****</ResourceGroupId>
    <ZoneId>cn-beijing-a</ZoneId>
    <Ipv6CidrBlock>2408:XXXX:3c5:44e::/64</Ipv6CidrBlock>
    <VSwitchName>test</VSwitchName>
    <ShareType>Shared</ShareType>
    <RouteTable>
        <RouteTableId>vtb-bp145q7glnuzdv****</RouteTableId>
        <RouteTableType>System</RouteTableType>
    </RouteTable>
    <Tags>
        <Key>FinanceDept</Key>
        <Value>FinanceJoshua</Value>
    </Tags>
</DescribeVSwitchAttributesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "VpcId" : "vpc-257gq642n****",
  "Status" : "Pending",
  "CreationTime" : "2021-08-22T10:40:25Z",
  "IsDefault" : false,
  "AvailableIpAddressCount" : 12,
  "NetworkAclId" : "1",
  "OwnerId" : 287683832402436800,
  "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",
  "RouteTable" : {
    "RouteTableId" : "vtb-bp145q7glnuzdv****",
    "RouteTableType" : "System"
  },
  "Tags" : [ {
    "Key" : "FinanceDept",
    "Value" : "FinanceJoshua"
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.