All Products
Search
Document Center

ENS:DescribeVSwitchAttributes

Last Updated:Jan 15, 2026
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Call the DescribeVSwitchAttributes interface to query the configuration of a specified VSwitch.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ens:DescribeVSwitchAttributesget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
VSwitchIdstringYes

The ID of the VSwitch.

vsw-5****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

C0003****2A8
EnsRegionIdstring

The ENS node ID.

cn-xian-unicom
NetworkIdstring

The network ID.

n-257gqcdfvx6n****
VSwitchNamestring

The name of the VSwitch.

Test-switch
CidrBlockstring

The IPv4 CIDR block of the network.

10.0.0.0/24
Statusstring

The status of the VSwitch, as follows:

  • Pending
  • Available
  • Releasing
Available
Descriptionstring

The description of the VSwitch.

This is my vswitch.
CreatedTimestring

The creation time, in UTC format (yyyy-MM-ddTHH:mm:ssZ).

2019-06-01T00:00:00Z
InstanceIdsarray

A list of instance IDs.

InstanceIdstring

The instance ID.

i-5****4evfn
NetworkInterfaceIdsarray

A list of elastic network interface IDs.

NetworkInterfaceIdstring

The elastic network interface ID.

eni-5****yfjm
LoadBalancerIdsarray

A list of load balancer instance IDs.

LoadBalancerIdstring

The load balancer instance ID.

lb-5****
NatGatewayIdsarray

A list of NAT gateway IDs.

NatGatewayIdstring

The NAT gateway ID.

nat-5****
HaVipIdsarray

A list of high-availability VIP instance IDs.

HaVipIdstring

The high-availability VIP instance ID.

havip-5****
VSwitchIdstring

The ID of the VSwitch.

vsw-5****
AvailableIpAddressCountlong

The number of available IP addresses in the VSwitch.

253

Examples

Sample success responses

JSONformat

{
  "RequestId": "C0003****2A8",
  "EnsRegionId": "cn-xian-unicom",
  "NetworkId": "n-257gqcdfvx6n****",
  "VSwitchName": "Test-switch",
  "CidrBlock": "10.0.0.0/24",
  "Status": "Available",
  "Description": "This is my vswitch.",
  "CreatedTime": "2019-06-01T00:00:00Z",
  "InstanceIds": {
    "InstanceId": [
      "i-5****4evfn"
    ]
  },
  "NetworkInterfaceIds": {
    "NetworkInterfaceId": [
      "eni-5****yfjm"
    ]
  },
  "LoadBalancerIds": {
    "LoadBalancerId": [
      "lb-5****"
    ]
  },
  "NatGatewayIds": {
    "NatGatewayId": [
      "nat-5****"
    ]
  },
  "HaVipIds": {
    "HaVipId": [
      "havip-5****"
    ]
  },
  "VSwitchId": "vsw-5****",
  "AvailableIpAddressCount": 253
}

Error codes

HTTP status codeError codeError messageDescription
400ens.interface.errorFailed to call API.-
400InvalidVSwitchId.NotFoundSpecified virtual switch does not exist.The specified virtual switch ID does not exist.
400NoPermissionPermission denied.-
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-

For a list of error codes, visit the Service error codes.