All Products
Search
Document Center

Cloud Enterprise Network:AttachCenChildInstance

Last Updated:Oct 22, 2024

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

Operation description

CEN allows you to attach a network instance that belongs to another Alibaba Cloud account to your CEN instance. 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 virtual private clouds (VPCs) that belong to another Alibaba Cloud account, see GrantInstanceToCen .
  • For more information about how to grant CEN permissions on Cloud Connect Network (CCN) instances that belong to another Alibaba Cloud account, see GrantInstanceToCbn .
  • By default, you cannot grant permissions on virtual border routers (VBRs) that belong to another Alibaba Cloud account to a CEN instance. If you need to use this feature, contact your account manager.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cen:AttachCenChildInstanceupdate
  • CenInstance
    acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}
  • virtualborderrouter
    acs:vpc:*:{#accountId}:virtualborderrouter/{#virtualborderrouterId}
  • VPC
    acs:vpc:*:{#accountId}:vpc/{#vpcId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
CenIdstringYes

The ID of the CEN instance.

cen-7qthudw0ll6jmc****
ChildInstanceIdstringYes

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

vpc-bp18sth14qii3pnvx****
ChildInstanceTypestringYes

The type of the network instance. Valid values:

  • VPC: VPC
  • VBR: VBR
  • CCN: CCN instance
VPC
ChildInstanceRegionIdstringYes

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
ChildInstanceOwnerIdlongNo

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

Note If the network instance and the CEN instance belong to different Alibaba Cloud accounts, this parameter is required.
1688000000000000

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

A278B8A6-A5B8-4FDE-9F70-95F0F6A1D68A

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400Forbbiden.AttachChildInstanceAcrossBidOperation is invalid, please apply for cross-bid attaching.-
400IncorrectStatus.VpcSwitchOperation is failed because some virtual switch is modifying within the same VPC.The error message returned because the status of the vSwitch does not support this operation. Try again later.
400Forbbiden.CloudBoxVSwitchExistThe operation is not allowed because of cloud box vswitch existed.The error message returned because the specified vSwitch is associated with a CloudBox. You cannot associate with the vSwitch.
400OperationFailed.InvalidVpcStatusOperation is failed because the child-instance is configuring.-
400OperationFailed.InvalidTransitRouterOperation failed because the transit router is not supported.Operation failed because the transit router is not supported.
400OperationUnsupported.CenFullLevelCEN full level does not support vpn bgp.The error message returned because CEN instances in FULL mode do not support BGP for VPN gateways.
400IncorrectStatus.VpcRouteTableThe VPC route table is not in a desired state.The error message returned because the VPC route table is in an unstable state. Try again later.
400InvalidOperation.VbrAttachedToEcrVBR has alreay attached to ECR.VBR has alreay attached to ECR.
400OperationUnsupported.VpcRoutePropagationSourceThe operation on this VPC route propagation source is not supported.The operation on this VPC route propagation source is not supported.
400InvalidStatus.ResourceStatusThe resource is not in a valid state for the attachment operation.The error message returned because the status of the specified resource does not support this operation. Try again later.
400IncorrectStatus.TransitRouterThe status of TransitRouter is incorrect.The error message returned because the status of the transit router does not support this operation. Try again later.
400InvalidParameterInvalid parameter.The error message returned because the parameter is set to an invalid value.
400UnauthorizedThe AccessKeyId is unauthorized.The error message returned because you do not have the permissions to perform this operation.
403Forbidden.AttachChildInstanceThe attached VBR on some access device models are not supported. Please submit a ticket to continue using this VBR on CEN.The attached VBR on some access device models are not supported. Please submit a ticket to continue using this VBR on CEN.
404Bid.NotFoundNot found childInstance Bid by specified AliUid.The error message returned because the BID does not exist.
404Operation.FailedAndTryAgainFail to get customer label by the specified aliUid.-
409InvalidOperation.ChildInstanceRIAlreadyExistOperation is invalid because the child-instance has already been attached to Express Connect.-
409Forbbiden.AttachChildInstanceAcrossUidOperation is invalid because the child-instance is not authorized to CEN.Operation is invalid because the child instance is not authorized to CEN.
409InvalidOperation.ChildInstanceAlreadyAttachedOperation 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.
409InvalidOperation.CenAlreadyAutoPubilshRouteToInstanceOperation is invalid because other cen has already auto published route to this instance.The error message returned because this operation is not supported when one or more other CEN instance can advertise routes to the specified instance.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-10The Error code has changedView Change Details
2023-03-15The Error code has changedView Change Details