All Products
Search
Document Center

Cloud Enterprise Network:ListGrantVSwitchEnis

Last Updated:Jul 23, 2026

Queries the elastic network interfaces (ENIs) within a virtual private cloud (VPC) that can serve as multicast sources or multicast members for multicast communication.

Operation description

Before you invoke the ListGrantVSwitchEnis operation, make sure that the VPC-connected instance is connected to Cloud Enterprise Network (CEN). For more information, see CreateTransitRouterVpcAttachment.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cen:ListGrantVSwitchEnis

get

*CenInstance

acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

CenId

string

Yes

The ID of the CEN instance to which the VPC-connected instance is connected.

cen-a7syd349kne38g****

VpcId

string

Yes

The ID of the VPC-connected instance.

vpc-p0w9alkte4w2htrqe****

VSwitchId

string

Yes

The ID of a vSwitch in the VPC-connected instance.

You can query network interface controller (NIC) information for only one vSwitch at a time.

vsw-p0w9s2ig1jnwgrbzl****

NextToken

string

No

The token for the next query. Valid values:

  • If this is the first query or no next query exists, leave this parameter empty.

  • If a next query exists, set this parameter to the NextToken value returned by the previous API call.

AAAAAdDWBF2****

MaxResults

integer

No

The maximum number of entries per page for a paged query. Valid values: 10 to 500.

Default value:

  • If you do not set this parameter, the default value is 20.

  • If the value you set is greater than 500, the default value is 500.

20

NetworkInterfaceId

array

No

The IDs of network interface controllers (NICs).

string

No

The ID of the elastic network interfaces (ENIs).

Currently, only ENIs associated with ECS instances can serve as multicast sources. The system sends multicast traffic to the multicast group from the primary private IP address of the elastic network interfaces (ENIs).

eni-wz9a2sgsskvw69v2****

NetworkInterfaceName

string

No

The name of the elastic network interfaces (ENIs). You can use this parameter to filter network interface controllers (NICs) by name.

test-eni-name

PrimaryIpAddress

string

No

The primary private IP IPv4 address of the elastic network interfaces (ENIs). You can use this parameter to filter network interface controllers (NICs) by primary private IP address.

192.168.**.**

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

DBFE1736-2F33-5309-9954-875B11E9519D

TotalCount

string

The total number of entries returned.

Important When you use the MaxResults and NextToken parameters for paging, the returned Total parameter value is meaningless.

6

GrantVSwitchEnis

array<object>

The list of network interface controller (NIC) information.

object

The elastic network interfaces (ENIs) information. Each entry contains the details of a network interface controller (NIC).

VpcId

string

The VPC-connected instance ID.

vpc-p0w9alkte4w2htrqe****

VSwitchId

string

The vSwitch ID.

vsw-p0w9s2ig1jnwgrbzl****

NetworkInterfaceId

string

The ID of the elastic network interfaces (ENIs). This is the network interface controller (NIC) identifier.

eni-p0w172vv82kxzb49****

Description

string

The description of the elastic network interfaces (ENIs). This describes the network interface controller (NIC).

created by CBN

TransitRouterFlag

boolean

Indicates whether the elastic network interface (ENI) is created by a transit router for routing and forwarding purposes.

  • true: The ENI is created by a transit router.

  • false: The ENI is not created by a transit router.

Elastic network interfaces (ENIs) created by transit routers cannot serve as multicast sources or multicast members.

false

NetworkInterfaceName

string

The name of the elastic network interfaces (ENIs). This is the network interface controller (NIC) name.

my-eni-name

PrimaryIpAddress

string

The primary private IP IPv4 address of the elastic network interfaces (ENIs). This is the network interface controller (NIC) primary private IP address.

192.168.**.**

NextToken

string

The token returned for this query.

AAAAAdDWBF2****

MaxResults

integer

The maximum number of entries returned for this query.

20

Examples

Success response

JSON format

{
  "RequestId": "DBFE1736-2F33-5309-9954-875B11E9519D",
  "TotalCount": "6",
  "GrantVSwitchEnis": [
    {
      "VpcId": "vpc-p0w9alkte4w2htrqe****",
      "VSwitchId": "vsw-p0w9s2ig1jnwgrbzl****",
      "NetworkInterfaceId": "eni-p0w172vv82kxzb49****",
      "Description": "created by CBN",
      "TransitRouterFlag": false,
      "NetworkInterfaceName": "my-eni-name",
      "PrimaryIpAddress": "192.168.**.**"
    }
  ],
  "NextToken": "AAAAAdDWBF2****",
  "MaxResults": 20
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidCenId.NotFound The specified CenId is not found. The error message returned because the specified CEN instance ID does not exist.
400 InvalidVpcId.NotFound The specified VpcId is not found. The error message returned because the specified VPC ID (VpcId) is invalid.
400 InvalidOperation.MulticastDomainAssociationNotExist Operation is invalid because multicast association domain association not exist. The error message returned because this operation is not supported when the specified multicast domain is not associated with the specified resource.
400 InvalidParameter Invalid parameter. The error message returned because the parameter is set to an invalid value.
400 Unauthorized The AccessKeyId is unauthorized. The error message returned because you do not have the permissions to perform this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.