Grants permissions to a transit router instance to connect to a network instance that belongs to a different account. Before a transit router instance can connect to a network instance that belongs to a different account, the network instance must authorize the transit router instance. Call the GrantInstanceToTransitRouter operation to grant the authorization.
Operation description
-
The
GrantInstanceToTransitRouteroperation only supports granting a transit router instance permissions to connect to cross-account Virtual Private Cloud (VPC) instances, Virtual Border Router (VBR) instances, IPsec connections, and Express Connect Router (ECR) instances.To grant a transit router instance permissions to connect to a Cloud Connect Network (CCN) instance, call the GrantInstanceToCbn operation.
-
Before you call the
GrantInstanceToTransitRouteroperation, make sure that you understand the billing rules of transit routers, the limits on authorization operations, and the prerequisites for authorization operations. For more information, see Cross-account network instance authorization. -
Before you authorize a network instance, make sure that the following operations are completed:
Confirm that the account to which the network instance belongs and the account to which the transit router instance belongs are of the same type.
Obtain the Alibaba Cloud account ID to which the transit router instance belongs.
Obtain the Cloud Enterprise Network (CEN) instance ID to which the transit router instance belongs.
Before you authorize a VBR instance, contact your account manager to activate the VBR instance authorization feature.
Before you authorize an IPsec connection, make sure that the IPsec connection is not associated with any resource:
If the IPsec connection is already associated with a VPN gateway instance, it cannot be associated with a transit router instance in the same account or a different account.
If the IPsec connection is already associated with a transit router instance, disassociate it first. For more information, see Delete a network instance connection.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:GrantInstanceToTransitRouter |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CenId |
string |
Yes |
The ID of the Cloud Enterprise Network (CEN) instance to which the transit router instance belongs. |
cen-44m0p68spvlrqq**** |
| InstanceId |
string |
Yes |
The instance ID of the network instance. |
vpc-bp1h8vbrbcgohcju5**** |
| InstanceType |
string |
Yes |
The type of the network instance. Valid values:
|
VPC |
| RegionId |
string |
No |
The region ID of the network instance. You can call the DescribeChildInstanceRegions operation to query region IDs. |
cn-hangzhou |
| CenOwnerId |
integer |
Yes |
The Alibaba Cloud account ID to which the CEN instance belongs. |
1250123456123456 |
| OrderType |
string |
No |
The payer of the network instance. Valid values:
Valid values:
|
PayByCenOwner |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
C6E5992C-A57B-5A6C-9B26-568074DC68BA |
Examples
Success response
JSON format
{
"RequestId": "C6E5992C-A57B-5A6C-9B26-568074DC68BA"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Forbbiden.TransitRouterServiceNotOpen | The user has not open transit router service. | The error message returned because the transit router is disabled. Enable the transit router and try again. |
| 400 | NoPermission.AliyunServiceRoleForCEN | You are not authorized to create the service linked role. Role Name: AliyunServiceRoleForCEN. Service Name: cen.aliyuncs.com. Make sure that the user has been granted the ram:CreateServiceLinkedRole permission. | The error message because you do not have the permissions to create the service-linked role whose role name is AliyunServiceRoleForCEN and service name is cen.aliyuncs.com. You must acquire the ram:CreateServiceLinkedRole permission before you can create the service-linked role. |
| 400 | IllegalParam.CenId | The specified CenId is invalid. | The error message returned because the ID of the CEN instance is invalid. |
| 400 | OperationFailed.TaskConflict | The operation is too frequent, please wait a moment and try again. | The error message returned because this operation is performed at a high frequency. Try again later. |
| 400 | InvalidVbr.NotFound | vbr is not found. | |
| 400 | OperationFailed.GrantCrossAccountExist | Cross-account authorization already exists. | Cross-account authorization already exists. |
| 400 | Forbidden.TransitRouterServiceExpired | The transit router service is out of service. | The transit router service has been suspended due for payment. Please renew the service and try again. |
| 400 | Forbidden.OperateShareResource | You cannot operate shared resources. | You cannot operate shared resources. |
| 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. |
| 400 | OperationFailed.CanNotGrantVbrInstanceToCen | Grant VBR instance to CEN is not supported for current VBR owner account. | Grant VBR instance to CEN is not supported for current VBR owner account. |
| 400 | InvalidParameter.CenId | The specified parameter CenId is invalid. | |
| 404 | InvalidInstanceId.NotFound | InstanceId is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.