You need to enable JavaScript to run this app.
导航

AttachInstanceToCen

最近更新时间2024.04.22 17:40:32

首次发布时间2022.01.07 11:44:37

调用 AttachInstanceToCen 接口,为云企业网实例加载网络实例。

调试

使用说明

同一云企业网实例在每个地域最多支持加载10个网络实例。

请求参数

参数名称
类型
是否必选
示例值
描述
ActionStringAttachInstanceToCen要执行的操作,取值为AttachInstanceToCen。
VersionString2020-04-01API版本信息,当前版本为2020-04-01。
CenIdStringcen-7qthudw0ll6jmc****CEN的ID。您可以调用DescribeCens接口获取云企业网实例ID。

InstanceOwnerId

String

210000****

网络实例所属账号的ID。

说明

加载跨账号网络实例时需要配置该参数。该参数不填时,默认为本账号ID,即云企业网实例所属的账号ID。

InstanceId

String

vpc-2fexiqjlgjif45oxruvso****

网络实例的ID。

InstanceType

String

VPC

网络实例的类型,取值如下:

  • VPC:私有网络
  • DCGW:专线网关
InstanceRegionIdStringcn-beijing网络实例所在的地域。

返回参数

参数名称
类型
示例值
描述
RequestIdString202111161611080102121461940900****请求ID。

请求示例

GET /?Action=AttachInstanceToCen&Version=2020-04-01&CenId=cen-7qthudw0ll6jmc****&InstanceId=vpc-2fexiqjlgjif45oxruvso****&InstanceType=vpc&InstanceRegionId=cn-beijing HTTP/1.1
Host: open.volcengineapi.com
Service: cen
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202112221125470102252****",
        "Action": "AttachInstanceToCen",
        "Version": "2020-04-01",
        "Service": "cen",
        "Region": "cn-beijing"
    },
    "Result": {}
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

HttpCode错误码错误信息描述
400InvalidCenAttachedInstance.CannotUpdateFailed to update the specified attached instance, please try again later.更新指定的网络实例失败,请稍候再试。
400InvalidCenAttachedInstance.MalformedThe specified instance type is malformed.指定的网络实例类型不支持。
400InvalidCenAttachedInstance.DcgwInvalidStatusSpecified direct connect gateway has been frozen.指定的专线网关已经被冻结。
400InvalidCenRouteEntry.AsPathMalformedThe specified AsPath is malformed.指定的AsPath属性不合法。
400InvalidCenAttachedInstance.InvalidStatusThe specified instance is not in the correct status for the request.指定的网络实例所处状态无法响应该请求。
400InvalidCenRouteEntry.AsNumberMalformedThe specified AS is malformed. Ensure the maximum value of AS is 4294960000.指定的AS号不合法。AS号不能大于4294960000。
400InvalidCenAttachedInstance.DcgwMismatchThe specified DCGW cannot be attached to CEN due to the lack of a virtual interface.指定的专线网关缺少虚拟接口,无法关联至云企业网实例。
400QuotaExceeded.CenAttachedInstanceYou've reached the number of instances can be attached to CEN in one region.已达到云企业网实例在该地域中可加载的网络实例数量上限。
403Forbidden.AttachCrossAccountDCGWYou are not authorized to attach the across account direct connect gateway.无权限对指定的专线网关进行操作。
404InvalidCrossAccountInstance.NotFoundThe specified instance has not been granted.指定的网络实例没完成授权。
404InvalidCEN.NotFoundThe specified CEN does not exist.指定的云企业网实例不存在。
404InvalidCenRegion.NotFoundThe specified region does not exist.指定的地域不存在。
404InvalidVpcId.NotFoundThe specified VPC ID does not exist in this region.指定的地域内该私有网络不存在。
404InvalidDcgwId.NotFoundThe specified DCGW ID does not exist in this region.指定的地域内该专线网关不存在。
409InvalidCen.InvalidStatusThe specified CEN instance is not in the correct status for the request.指定的云企业网实例所处状态无法响应该请求,请稍后再试。
409InvalidCenAttachedInstance.ConflictThe specified instance has already been attached to CEN.指定的网络实例已加载至云企业网实例。
409InvalidCenAttachedInstance.ConflictThe specified instance has already been attached to Transit Router.指定的网络实例已加载至中转路由器。