AttachClassicLinkVpc - 将经典网络类型实例连接到专有网络VPC

调用AttachClassicLinkVpc将一台经典网络类型实例连接到专有网络VPC中,使经典网络类型实例可以和VPC中的云资源私网互通。

接口说明

调用该接口时,您需要注意:

  • 连接经典网络类型实例前,实例必须处于运行中(Running)或者已停止(Stopped)状态。
  • 目标 VPC 必须已开启 ClassicLink 功能。具体操作,请参见开启 ClassicLink 功能
  • 经典网络类型实例和 VPC 必须在同一个阿里云地域。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring

实例所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

cn-hangzhou
InstanceIdstring

经典网络类型实例 ID。您可以调用 DescribeInstances 查看您可用的实例。

i-bp1gtjxuuvwj17zr****
VpcIdstring

开启 ClassicLink 的 VPC ID。您可以调用 DescribeVpcs 查看您可用的 VPC。

vpc-bp1j4z1sr8zxu4l8u****

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

示例

正常返回示例

JSON格式

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

错误码

HTTP status code错误码错误信息描述
403InvalidInstanceId.NotFoundThe InstanceId provided does not exist in our records.指定的实例不存在,请您检查实例 ID 是否正确。
403InvalidRegionId.MalformedThe specified parameter ?RegionId? is not valid.指定的 RegionId 不合法。
403InvalidVpcId.MalformedThe specified parameter ?VpcId? is not valid.指定的 VpcId 不合法。
403InvalidInstanceId.MalFormedThe specified instance is not a classic network instance.指定的实例不是经典网络实例。
403OperationDeniedThe instance does not allow link to vpc.该实例已链接到其他 VPC。
403InvalidParameter.InvalidInstanceIdAndVpcIdThe parameter InstanceId and VpcId are not allowed to be empty at the same time.至少指定一个 InstanceId 或 VpcId。
403OperationDeniedThe instance has been linked to other vpc.-
403OperationDeniedThe specified vpc is disabled attach classic link.指定的 VPC 网络禁止创建 classicLink 链接。
403InvalidInstanceId.NotFoundThe specified instance does not exist.指定的实例不存在,请您检查实例 ID 是否正确。
403InvalidStatus.InstanceStatusThe specified instance status is not support this operation ,expect status is running or shutted.指定的实例状态不支持此操作,期望的操作状态是 Running 或者 Stopped。
403InvalidStatus.InstanceStatusThe specified instance status is not support this operation, expect status is running or shutted.指定的实例状态不支持此操作,期望的操作状态是 Running 或者 Stopped。
403InvalidInstanceId.NotBelongThe specified instance is not belong to you.指定的实例不在您账号下。
403QuotaExceededThe link quota exceeded in this vpc.已达到指定的 VPC 网络创建链接的配额。
403InvalidStatus.InstanceLockedThe specified instance is locked,please wait more.指定的实例被锁定,请等待解锁后再操作。
403InvalidInstanceId.LimitedRegionThe specified instance does not support this operation due to the limitation of its region.指定的实例受区域的限制,不支持此操作。
403Forbidden.SubUserUser not authorized to operate on the specified resource.您当前的子账号没有操作此资源的权限。
403InvalidInstanceId.NotFoundThe specified Instance is not exist.-
403InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.提供的RegionId不存在

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史