AssociateRouteTable_专有网络_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

AssociateRouteTable 接口属于异步接口,即系统返回一个请求 ID,但该路由表并未绑定完成,系统后台的绑定任务仍在进行。您可以调用 DescribeVSwitchAttributes 查询路由表的绑定状态:

  • 当交换机处于 Pending 状态时,表示路由表正在绑定中。
  • 当交换机处于 Available 状态时,表示路由表绑定成功。

流控信息

请求速率为300/60(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
vpc:AssociateRouteTable
Update
VSwitch
acs:vpc:{#regionId}:{#accountId}:vswitch/{#vswitchId}

请求参数

字段名称字段详情
RegionIdstring

要绑定交换机的路由表所属的 VPC 的地域 ID。展开详情

示例值:cn-hangzhou参考取值来源:
    DescribeRegions
RouteTableIdstring

要绑定到交换机的路由表的 ID。

示例值:vtb-bp145q7glnuzdvzu2****参考取值来源:
    CreateRouteTable
    DescribeRouteTableList
    PublishVpcRouteEntries
VSwitchIdstring

要绑定路由表的交换机的 ID。

示例值:vsw-25ncdvfaue4****参考取值来源:
    CreateVSwitch
    DescribeVSwitches
    ListVSwitchCidrReservations
    GetVSwitchCidrReservationUsage
ClientTokenstring

客户端 Token,用于保证请求的幂等性。展开详情

示例值:02fb3da4-130e-11e9-8e44-0016e04115b

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:DC668356-BCB4-42FD-9BC3-FA2B2E04B634

返回示例

错误返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
OperationDenied.CloudBoxVbrEntryExist
The operation is not allowed because the routing table has a route entry for the next hop to the cloud box VBR.诊断
400
OperationDenied.OtherCloudBoxVbrEntryExist
The operation is not allowed because the routing table has a route entry for the next hop that points to a VBR other than this cloud box.诊断
400
ResourceAlreadyAssociated.RouteTable
The resource has already associated with a routetable.诊断
400
OperationDenied.AssociateGatewayRouteTable
The operation is not allowed because gateway route tables cannot be bound to a vSwitch.诊断
400
OperationDenied.SwitchToSystemRouteTable
The associated route tables cannot be directly changed to system route tables.诊断
400
ResourceNotFound.VSwitch
The specified resource of VSwitch is not found.诊断
400
InvalidRouteTableId.NotFound
Specified route table does not exist.诊断
400
OperationDenied.LocalRouteEntryModified
The next hop of a local route is modified.诊断
400
MissingParam.VSwitchId
The parameter VSwitchId is missing.诊断
404
InvalidRegionId.NotFound
Specified value of RegionId is not supported.诊断
404
InvalidParameter.Action
This vpc feature is not supported in this region诊断
404
InvalidRouteTableId.NotFound
Specified route table does not exist.诊断
404
InvalidVSwitchId.NotFound
Specified VSwitch does not exist.诊断
404
IncorrectVSwitchStatus
The current status of the virtual switch does not support this operation.诊断
404
Forbidden.VSwitchAlreadyAssociatedRouteTable
The specified virtual switch already associates route table.诊断
404
Forbidden.NotInSameVpc
The specified virtual switch and route table are not in the same VPC.诊断
404
IncorrectStatus.RouteTable
The status of the specified route table is incorrect.诊断

变更历史

变更时间变更内容概要操作
2024-12-31
变更错误码400
2024-09-06
变更错误码400
2023-08-18
变更错误码400
2023-08-03
变更错误码400
2023-06-21
变更错误码400
2023-06-09
变更错误码400
2022-01-21
变更错误码400

相关示例

创建VSwitch --> 创建子网路由表 --> 绑定子网路由表到VSwitch
2021-12-16