Queries the elastic network interfaces (ENIs) that can be used as multicast sources or members in a specified virtual private cloud (VPC).
Operation description
Before you call ListGrantVSwitchEnis
, make sure that the VPC is attached to a Cloud Enterprise Network (CEN) instance. For more information, see CreateTransitRouterVpcAttachment .
Debugging
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:
- The required resource types are displayed in bold characters.
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cen:ListGrantVSwitchEnis | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
CenId | string | Yes | The ID of the CEN instance to which the VPC is attached. | 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 specify only one vSwitch in each call. | vsw-p0w9s2ig1jnwgrbzl**** |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken. | AAAAAdDWBF2**** |
MaxResults | long | No | The number of entries to return on each page. Valid values: 10 to 500. Default value:
| 20 |
NetworkInterfaceId | array | No | The ID of ENI N. Valid values of N: 1 to 100. | |
string | No | The ID 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
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-08-03 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |