Attaches a network instance to a Cloud Enterprise Network (CEN) instance.

Description

CEN allows you to attach a network instance that belongs to another Alibaba Cloud account. Before you attach the network instance, CEN must acquire permissions to access the network instance that belongs to another Alibaba Cloud account.

  • For more information about how to grant CEN permissions on accessing virtual private clouds (VPCs) that belong to another Alibaba Cloud account, see GrantInstanceToCen.
  • For more information about how to grant CEN permissions on accessing Cloud Connect Network (CCN) instances that belong to another Alibaba Cloud account, see GrantInstanceToCbn.
  • By default, you cannot grant CEN permissions on accessing virtual border routers (VBRs) that belong to another Alibaba Cloud account. To grant the permissions, you must submit a ticket.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No AttachCenChildInstance

The operation that you want to perform. Set the value to AttachCenChildInstance.

CenId String Yes cen-7qthudw0ll6jmc****

The ID of the CEN instance.

ChildInstanceId String Yes vpc-bp18sth14qii3pnvx****

The ID of the network instance that you want to attach to the CEN instance.

ChildInstanceRegionId String Yes cn-hangzhou

The region ID of the network instance.

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

ChildInstanceType String Yes VPC

The type of the network instance. Valid values:

  • VPC: VPC
  • VBR: VBR
  • CCN: CCN instance
ChildInstanceOwnerId Long No 1688000000000000

The ID of the Alibaba Cloud account to which the network instance belongs.

Note This parameter is required if you want to attach a network instance that belongs to another Alibaba Cloud account.

Response parameters

Parameter Type Example Description
RequestId String A278B8A6-A5B8-4FDE-9F70-95F0F6A1D68A

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AttachCenChildInstance
&CenId=cen-7qthudw0ll6jmc****
&ChildInstanceId=vpc-bp18sth14qii3pnvx****
&ChildInstanceRegionId=cn-hangzhou
&ChildInstanceType=VPC
&<Common request parameters>

Sample success responses

XML format

<AttachCenChildInstanceResponse>
      <RequestId>A278B8A6-A5B8-4FDE-9F70-95F0F6A1D68A</RequestId>
</AttachCenChildInstanceResponse>

JSON format

{
    "RequestId":"A278B8A6-A5B8-4FDE-9F70-95F0F6A1D68A"
}

Error codes

HttpCode Error code Error message Description
409 Forbbiden.AttachChildInstanceAcrossUid Operation is invalid because the child-instance is not authorized to CEN. The error message returned because the CEN instance does not have the required permissions. Grant CEN the required permissions and try again.
403 Forbidden.AttachChildInstance The attached VBR on some access device models are not supported. Please submit a ticket to continue using this VBR on CEN. The error message returned because the VBR cannot be attached to the CEN instance. To resolve this issue, submit a ticket.
409 InvalidOperation.ChildInstanceAlreadyAttached Operation is invalid because the child-instance has already been attached to another CEN. The error message returned because the network instance is already attached to another CEN instance.
400 OperationFailed.InvalidTransitRouter Operation failed because the transit router is not supported. The error message returned because the route table of the transit router does not support this operation.

For a list of error codes, visit the API Error Center.