All Products
Search
Document Center

Virtual Private Cloud:GrantInstanceToCen

Last Updated:Aug 28, 2026

Grants permissions to a CEN instance.

Operation description

  • 在加载其他阿里云账号(主账号)的网络实例前,需要在网络实例所在的阿里云账号下为云企业网实例授权。

Note

GrantInstanceToCen 接口是 VPC 的 API,所以调用该接口需要使用vpc.aliyuncs.com域名。API version 为2016-04-28

  • GrantInstanceToCen 接口不支持在同一个 VPC、VBR 或者 CCN 中并发为云企业网实例授权。

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the network instance is deployed.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

InstanceId

string

Yes

The ID of the network instance.

vpc-uf6o8d1dj8sjwxi6o****

InstanceType

string

Yes

The type of the network instance. Valid values:

  • VPC

  • VBR

VPC

CenId

string

Yes

The ID of the CEN instance to which you want to grant permissions.

cen-7qthudw0ll6jmc****

CenOwnerId

integer

Yes

The user ID (UID) of the Alibaba Cloud account to which the CEN instance belongs.

123456789

ClientToken

string

No

A client token that ensures the idempotence of the request.

You can use the client to generate the token, but you must ensure that the token is unique across requests. The token can contain only ASCII characters.

Note

If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.

0c593ea1-3bea-11e9-b96b-88e9fe637760

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Success response

JSON format

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status code

Error code

Error message

Description

400 IncorrectStatus Current Instance status does not support this operation.
400 TaskConflict The operation is too frequent, TaskConflict. The system is unavailable. Try again later.
400 MissingParam.CenInstanceId %s
400 IllegalParam.CenInstanceId %s
400 Invalid.Grant Can not grant to other owner cen. You cannot attach the VBR to a CEN instance that belongs to another Alibaba Cloud account.
404 InvalidInstanceId.NotFound Specified Instance does not exist.
404 InstanceType.Invalid Specified type is not valid.
404 QuotaExceeded.CbnGrantRules cbn grantRules per instance quota exceed
404 InvalidRegionId.NotFound The RegionId provided does not exist in our records.
404 InvalidVbr.NotFound Specified vbr does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.