You can call the ListGrantVSwitchEnis operation to query which elastic network interfaces (ENIs) in a virtual private cloud (VPC) can serve as multicast sources or members.
Operation description
Before you call the ListGrantVSwitchEnis operation, make sure that the VPC is connected to a Cloud Enterprise Network (CEN) instance. For more information, see CreateTransitRouterVpcAttachment.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:ListGrantVSwitchEnis |
get |
*CenInstance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CenId |
string |
Yes |
The ID of the CEN instance to which the VPC is connected. |
cen-a7syd349kne38g**** |
| VpcId |
string |
Yes |
The ID of the VPC. |
vpc-p0w9alkte4w2htrqe**** |
| VSwitchId |
string |
Yes |
The ID of a vSwitch in the VPC. You can query information about the ENIs in only one vSwitch at a time. |
vsw-p0w9s2ig1jnwgrbzl**** |
| NextToken |
string |
No |
The token that is used for the next query. Valid values:
|
AAAAAdDWBF2**** |
| MaxResults |
integer |
No |
The maximum number of entries to return on each page. Valid values: 10 to 500. Default value:
|
20 |
| NetworkInterfaceId |
array |
No |
The ID of the ENI. |
|
|
string |
No |
The ID of the ENI. The system supports only ENIs that are associated with Elastic Compute Service (ECS) instances as multicast sources. The system sends multicast traffic to multicast groups from the primary private IP address of the ENI. |
eni-wz9a2sgsskvw69v2**** |
|
| NetworkInterfaceName |
string |
No |
The name of the ENI. |
test-eni-name |
| PrimaryIpAddress |
string |
No |
The primary private IPv4 address of the ENI. |
192.168.XX.XX |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
DBFE1736-2F33-5309-9954-875B11E9519D |
| TotalCount |
string |
The total number of entries. Important
This parameter is invalid if you use MaxResults and NextToken to perform a paged query. |
6 |
| GrantVSwitchEnis |
array<object> |
A list of ENI information. |
|
|
object |
The information about the ENI. |
||
| VpcId |
string |
The ID of the VPC. |
vpc-p0w9alkte4w2htrqe**** |
| VSwitchId |
string |
The ID of the vSwitch. |
vsw-p0w9s2ig1jnwgrbzl**** |
| NetworkInterfaceId |
string |
The ID of the ENI. |
eni-p0w172vv82kxzb49**** |
| Description |
string |
The description of the ENI. |
created by CBN |
| TransitRouterFlag |
boolean |
Indicates whether the ENI is created by a transit router.
ENIs created by transit routers cannot be used as multicast sources or members. |
false |
| NetworkInterfaceName |
string |
The name of the ENI. |
my-eni-name |
| PrimaryIpAddress |
string |
The primary private IPv4 address of the ENI. |
192.168.XX.XX |
| NextToken |
string |
The token that is used for the next query. |
AAAAAdDWBF2**** |
| MaxResults |
integer |
The maximum number of entries returned. |
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.XX.XX"
}
],
"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.