edit-icon download-icon

AttachCenChildInstance

Last Updated: Mar 28, 2018

Description

Attach a network (VPC or VBR) to a CEN instance. The attached networks (VPC or VBR) can communicate with each other.

Note: If the network to attach belongs to another account, the account owner of the network must use the GrantInstanceToCen API to authorize CEN to attach the network.

Request parameters

Name Type Required Description
Action String Yes

The action to perform. Valid value:

AttachCenChildInstance

CenId String Yes The ID of the CEN instance.
ChildInstanceId String Yes The ID of the network to attach.
ChildInstanceTypeStringYes

The type of the network to attach. Valid value:

VPC | VBR

Note: Ensure that the network is not used in Express Connect.

ChildInstanceRegionIdStringYes The ID of the region where the network is located.
ChildInstanceOwnerIdLongNo

The account ID to which the network belongs.

Note: This parameter is required when attaching a network instance in another account.

Response parameters

Name Type Description
RequestId String The ID of the request.

Error codes

The following table lists the error codes specific to this API. For more information about common error codes, see Common error codes.

Error code Error message HTTP status code Description
InvalidOperation.ChildInstanceAlreadyAttached Operation is invalid because the child-instance has already been attached to another CEN. 409 The network has been attached.

Examples

Request example

  1. http://cbn.aliyuncs.com/?Action=AttachCenChildInstance
  2. &CenId=vpc-hp3kz27b1uv9hsmm9vqiv
  3. &ChildInstanceId=vpc-2zeki1et77fssihllb9s7
  4. &ChildInstanceRegionId=cn-beijing
  5. &ChildInstanceType=vpc
  6. &<Common parameters>

Response example

XML format

  1. <?xml version='’1.0' encoding='’UTF-8'’?>
  2. <AttachCenChildInstanceResponse>
  3. <RequestId>A278B8A6-A5B8-4FDE-9F70-95F0F6A1D68A</RequestId>
  4. </AttachCenChildInstanceResponse>

JSON format

  1. {
  2. "RequestId":"A278B8A6-A5B8-4FDE-9F70-95F0F6A1D68A"
  3. }
Thank you! We've received your feedback.