AssociateRouteTableWithGateway - 绑定网关路由表和网关

更新时间:
复制 MD 格式

调用AssociateRouteTableWithGateway接口将网关路由表和同一VPC内的IPv4网关、IPv6网关实例绑定。

调试

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

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

vpc:AssociateRouteTableWithGateway

create

*Ipv4Gateway

acs:vpc:{#regionId}:{#accountId}:ipv4gateway/{#ipv4gatewayId}

*RouteTable

acs:vpc:{#regionId}:{#accountId}:routetable/{#routetableId}

请求参数

名称

类型

必填

描述

示例值

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

是否只预检此次请求。取值:

  • true:发送检查请求,不会关联网关路由表和 IPv4 网关实例。检查项包括是否填写了必需参数、请求格式、业务限制。如果检查不通过,则返回对应错误。如果检查通过,则返回错误码DryRunOperation

  • false(默认值):发送正常请求,通过检查后返回 HTTP 2xx 状态码并直接关联网关路由表和 IPv4 网关实例。

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网关实例不存在。

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

变更历史

更多信息,参考变更详情