AssociateRouteTablesWithVpcGatewayEndpoint - 关联路由表与网关终端节点

更新时间:
复制 MD 格式

调用AssociateRouteTablesWithVpcGatewayEndpoint接口关联路由表与网关终端节点。

接口说明

在调用本接口关联路由表与网关终端节点时,请了解以下内容:

  • 要关联路由表的网关终端节点实例不能处于 Creating(创建中)、Modifying(修改中)、Associating(绑定中)、Dissociating(解绑中)、Deleting(删除中)等中间状态。

  • 要关联的路由表不能处于 Creating(创建中)、Modifying(修改中)、Associating(绑定中)、Dissociating(解绑中)、Deleting(删除中)等中间状态。

  • 要关联的路由表和网关终端节点必须属于同一个 VPC。

  • 要关联的路由表不能是被共享的。

  • 不支持关联 VBR 路由表。

  • 一次最多关联 20 张路由表。

  • AssociateRouteTablesWithVpcGatewayEndpoint 接口属于异步接口,即系统返回一个实例 ID,但该路由表与网关终端节点尚未绑定成功,系统后台的绑定任务仍在进行。您可以调用 GetVpcGatewayEndpointAttribute 查询路由表与网关终端节点的绑定状态:
    • 当路由表与网关终端节点处于 Associating 状态时,表示路由表与网关终端节点正在绑定中。

    • 当路由表与网关终端节点处于 Created 状态时,表示路由表与网关终端节点绑定成功。

  • AssociateRouteTablesWithVpcGatewayEndpoint 接口不支持并发关联同一个路由表与网关终端节点。

调试

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

调试

授权信息

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

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

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

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

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

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

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

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

操作

访问级别

资源类型

条件关键字

关联操作

vpc:AssociateRouteTablesWithVpcGatewayEndpoint

create

*GatewayEndpoint

acs:vpc:{#regionId}:{#accountId}:gatewayendpoint/{#GatewayEndpointId}

请求参数

名称

类型

必填

描述

示例值

EndpointId

string

要关联路由表的网关终端节点实例 ID。

vpce-m5e371h5clm3uadih****

RouteTableIds

array

要关联的路由表 ID。N 的取值范围为 1~20,即一次最多绑定 20 张路由表。

vtb-m5elgtm3aj586iitr****

string

要关联的路由表 ID。N 的取值范围为 1~20,即一次最多绑定 20 张路由表。

vtb-m5elgtm3aj586iitr****

ClientToken

string

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。

说明

若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。

5A2CFF0E-5718-45B5-9D4D-70B3FF3898

DryRun

boolean

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

  • true:发送检查请求,不会关联路由表。检查项包括 AccessKey 是否有效、RAM 用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DryRunOperation

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

false

RegionId

string

要关联路由表的网关终端节点的地域 ID。

您可以通过调用 DescribeRegions 接口获取地域 ID。

cn-hangzhou

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

请求 ID。

59BDDA2D-FB52-59F9-9DC5-5EA7D6808B8E

示例

正常返回示例

JSON格式

{
  "RequestId": "59BDDA2D-FB52-59F9-9DC5-5EA7D6808B8E"
}

错误码

HTTP status code

错误码

错误信息

描述

400 OperationFailed.ConcurrentOperation The operation is failed because of concurrent operation.
400 IdempotentParameterMismatch The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.
400 ResourceNotFound.GatewayEndpoint The specified resource gateway endpoint is not found. 指定的GatewayEndpoint不存在
400 IncorrectStatus.GatewayEndpoint The status of GatewayEndpoint [%s] is incorrect.
400 ResourceNotFound.ServiceName The specified resource service name is not found.
400 ResourceNotFound.PrefixList The specified resource prefixList is not found.
400 ResourceNotFound.RouteTable The specified resource routetable is not found.
400 Mismatch.VpcAndRouteTable The vpc and routetable are mismatched.
400 IncorrectStatus.RouteTable The status of route table [%s] is incorrect.
400 ResourceAlreadyExist.Association The specified resource of [%s] is already exist.
400 VPC_ROUTE_ENTRY_CIDR_BLOCK_DUPLICATE Specified CIDR block is already exists.
400 VPC_SWITCH_STATUS_ERROR vSwitch status error, %s
400 QuotaExceeded.VpcRouteEntryNum The quota of vpc route entry num is exceeded, usage %s/%s.
400 OperationUnsupported.DestinationCidrBlockOverlapWithVSwitch The operation is failed because of destination CIDR block is in the CIDR of the VSwitch.
400 SystemBusy System is busy, please try again later.
400 Forbbiden User not authorized to operate on the specified resource.
400 InvalidRegionId.NotFound The regionId provided does not exist in our records. 指定的RegionId不存在。请检查该参数是否正确。
400 IncorrectStatus.Vpc The status of vpc [%s] is incorrect.
400 IncorrectStatus.CenStatus The status of vpc cenStatus [%s] is incorrect.
400 UnsupportedFeature.RouterTableType The type of router table is not supported. 您指定的路由表类型不支持。

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

变更历史

更多信息,参考变更详情