文档

CreateTransitRouterPrefixListAssociation - 为企业版转发路由器路由表绑定前缀列表

更新时间:

为企业版转发路由器路由表绑定前缀列表。

接口说明

  • 仅企业版转发路由器的路由表支持绑定前缀列表。
  • 一个前缀列表只支持绑定至一个企业版转发路由器路由表。
  • 待绑定的前缀列表下的网段不能和企业版转发路由器路由表中已有的路由条目的网段有重叠,否则会绑定失败。
  • 如果企业版转发路由器路由表需要绑定多个前缀列表,请确保多个前缀列表之间的网段没有重叠,否则会绑定失败。

前提条件

  • 您已经创建了前缀列表。具体操作,请参见 CreateVpcPrefixList
  • 如果企业版转发路由器路由表需要绑定跨账号的前缀列表,请确保待绑定的前缀列表已被共享给企业版转发路由器路由表所属的阿里云账号(主账号)。关于如何共享前缀列表资源,请参见资源共享概述API 参考(资源共享)

调试

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

授权信息

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

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
cen:CreateTransitRouterPrefixListAssociationWrite
  • TransitRouterRouteEntry
    acs:cen:*:{#accountId}:centransitrouterroutentry/*

请求参数

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

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

从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。

说明 若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。
123e4567-e89b-12d3-a456-4266****
RegionIdstring

转发路由器实例所属的地域 ID。

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

cn-hangzhou
TransitRouterIdstring

转发路由器实例 ID。

tr-6ehx7q2jze8ch5ji0****
NextHopTypestring

下一跳类型。取值:

  • BlackHole:表示指定前缀列表下的网段均为黑洞路由,所有去往前缀列表下网段的流量均会被丢弃。
  • VPC:表示指定前缀列表下网段的下一跳为专有网络 VPC(Virtual Private Cloud)连接。
  • VBR:表示指定前缀列表下网段的下一跳为边界路由器 VBR(Virtual Border Router)连接。
  • TR:表示指定前缀列表下网段的下一跳为跨地域连接。
VPC
PrefixListIdstring

前缀列表 ID。

pl-6ehtn5kqxgeyy08fi****
TransitRouterTableIdstring

转发路由器路由表 ID。

vtb-6ehgc262hr170qgyc****
NextHopstring

下一跳连接 ID。

说明 如果 NextHopType 的取值为 BlackHole,本参数需输入 BlackHole
tr-attach-flbq507rg2ckrj****
OwnerUidlong

前缀列表所属的阿里云账号(主账号)ID。

1210123456123456
DryRunboolean

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

  • true:发送检查请求,不会创建绑定关系。检查项包括是否填写了必需参数、请求格式、业务限制等。如果检查不通过,则返回对应错误。如果检查通过,则返回错误码DryRunOperation
  • false(默认值):发送正常请求,通过检查后直接创建绑定关系。
false

返回参数

名称类型描述示例值
object

返回结果。

RequestIdstring

请求 ID。

0C2EE7A8-74D4-4081-8236-CEBDE3BBCF50

示例

正常返回示例

JSON格式

{
  "RequestId": "0C2EE7A8-74D4-4081-8236-CEBDE3BBCF50"
}

错误码

HTTP status code错误码错误信息描述
400NoPermission.AliyunServiceRolePolicyForCENYou are not authorized to create the service linked role. Role Name: AliyunServiceRolePolicyForCEN. Service Name: cen.aliyuncs.com. Make sure that the user has been granted the ram:CreateServiceLinkedRole permission.您没有权限创建服务关联角色,角色名:AliyunServiceRolePolicyForCEN,服务名:cen.aliyuncs.com。请确保已授予当前用户ram:CreateServiceLinkedRole权限。
400ResourceNotSupport.CCNCCN not support prefix list.CCN不支持prefix list。
400ResourceNotFound.PrefixlistCidrsCan not find any cidr of specified prefix list.prefix list不存在cidr。
400ResourceNotFound.NexthopThe specified nexthop instance is not exsit.参数中指定的nexthop不存在。
400ResourceExisted.PrefixlistAssociationThe prefix list has been already associated with this route table.prefix list已与路由表绑定。
400ResourceNotFound.PrefixlistAssociationThe prefix list is not associated with this route table. prefix list未与路由表绑定。
400ResourceConflict.RouteSome of the prefixes of the prefix list are conflicted with exsited routes. prefix list与已有路由存在冲突。
400MultipleFound.PrefixlistAssociationmultiple same prefix association record found.系统异常,系统中存在多个相同的记录。
400QuotaReached.RouteThe quota of the route table is not enough for the request prefix list. 路由数量已达到上限。
400InvalidStatus.PrefixlistAssociationThe prefix list association is not in a valid state for the operation.当前PrefixlistAssociation状态不支持该操作,请稍后重试。
400NotSupport.TrTypeThe basic tr type is not support for this operation.基础版转发路由器不支持该操作。
400InvalidValue.PrefixlistCidrInvalid cidr exist in the specified prefixlist.prefixlist中存在不合法的cidr。
400ResourceNotSupport.NexthopThe specified nexthop instance type is not support for the operation.参数中指定的nexthop不支持该操作。
400ResourceMismatch.NexthopThe specified nexthop and nexthop type mismatched.参数中指定的nexthop或nexthopType有误。
400ResourceNotFound.PrefixListThe specified prefixlist does not found.参数中指定的prefixlist不存在。
400OperationDenied.SystemPrefixListSystemPrefixList can not be operated.SystemPrefixList不允许操作。
400OperationFailed.OperateShareResourceOperate share prefixlist failed.共享prefixlist失败。
400InvalidStatus.PrefixlistPrefixlist is not in a operate status.当前Prefixlist状态不支持该操作。
400RegionNotSupport.PrefixlistPrefixlist association are not supported in this region.当前地域不支持该功能。
400OperationFailed.TransitRouterNotExistOperation failed because transit router not exist.转发路由器不存在。
400IncorrectStatus.RouteTableRouteTable status is invalid.当前操作涉及的路由表状态不是稳态,无法操作。
400IllegalParam.TransitRouterTableIdThe specified Route Table ID is invalid.路由表ID不合法。
400InvalidParameterInvalid parameter.参数不合法。
400UnauthorizedThe AccessKeyId is unauthorized.账号无权限操作。
404InvalidRouteTableId.NotFoundThe specified RouteTableId is not found.RouteTableId不存在。

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

变更历史

变更时间变更内容概要操作
2023-11-22OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:404
2022-08-25OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
  • 本页导读 (1)
文档反馈