调用AssociateRouteTableWithGateway接口将网关路由表和同一VPC内的IPv4网关、IPv6网关实例绑定。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:AssociateRouteTableWithGateway |
create |
*Ipv4Gateway
*RouteTable
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
要绑定的网关路由表和 IPv4 网关实例所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
ap-southeast-6 |
| RouteTableId |
string |
是 |
要绑定的网关路由表 ID。 |
vtb-5ts0ohchwkp3dydt2**** |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。 |
123e4567-e89b-12d3-a456-426655440000 |
| DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
| GatewayId |
string |
是 |
要关联的 IPv4 网关实例 ID。 要关联的 IPv4 网关实例必须为已激活状态。 |
ipv4gw-5tsnc6s4ogsedtp3k**** |
| GatewayType |
string |
否 |
要关联的网关实例的类型。 |
Ipv4Gateway |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
F89C2176-8F10-55EF-90CF-CF99D1E3F816 |
示例
正常返回示例
JSON格式
{
"RequestId": "F89C2176-8F10-55EF-90CF-CF99D1E3F816"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ResourceNotFound.Ipv4Gateway | The specified resource ipv4Gateway is not found. | 未找到指定的Ipv4网关,无法删除 |
| 400 | IncorrectStatus.Ipv4Gateway | The status of %s [%s] is incorrect. | 指定的Ipv4Gateway处于非稳态,请稍后重试 |
| 400 | ResourceAlreadyAssociated.Ipv4Gateway | The specified resource %s is already associated. | 指定的ipv4网关已经被绑定 |
| 400 | ResourceNotFound.GatewayRouteTable | The specified resource GatewayRouteTable is not found. | 无法找到指定的网关路由表 |
| 400 | IncorrectStatus.GatewayRouteTable | The status of %s [%s] is incorrect. | 指定的网关路由表实例处于非稳态,请稍后重试 |
| 400 | ResourceAlreadyAssociated.GatewayRouteTable | The specified resource %s is already associated. | 指定的网关路由表已绑定同类型网关实例 |
| 400 | OperationDenied.Ipv4GatewayNotActive | The operation is not allowed because of ipv4Gateway [%s] is not active. | 操作不允许,因为指定的ipv4网关未激活 |
| 400 | OperationDenied.RouteTableTypeIncorrect | The operation is not allowed because of routeTableType is incorrect. | 操作不允许,因为路由表类型不对 |
| 400 | ResourceNotFound.RouteTable | The specified resource gatewayRouteTable is not found. | 网关路由表不存在 |
| 400 | OperationDenied.GatewayAndTableNotInOneVpc | The operation is not allowed because of GatewayAndTableNotInOneVpc. | 您指定的网关路由表和网关实例不属于同一个VPC,请检查您的输入是否正确 |
| 400 | IncorrectStatus.RouteTable | The status of the specified route table is incorrect. | |
| 400 | IllegalParam.GatewayType | The param of %s is illegal. | 输入的GatewayType非法 |
| 400 | UnsupportedFeature.Ipv6GatewayRouteTable | The feature of %s is not supported. | 您指定的网关路由表暂不支持绑定该网关实例 |
| 400 | OperationDenied.IngressRoutingNotSupportAnycast | The operation is not allowed because ingress routing not support anycast. | 操作失败,因为指定Vpc中存在Anycast弹性公网IP |
| 400 | OperationDenied.ExistPublicIpv6IpInVpc | Operation denied because IPV6 public ip exists in VPC. | 操作失败,因为VPC中存在ipv6公网IP |
| 400 | ResourceNotFound.Ipv6Gateway | The specified resource of IPv6 Gateway is not found. | 传入的IPv6网关实例不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。