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

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

接口说明

为企业版转发路由器路由表绑定前缀列表前,请确保满足以下条件:

  • 您已了解前缀列表的使用限制、路由兼容性说明等信息,请参见前缀列表

  • 您已经创建了前缀列表。具体操作,请参见 CreateVpcPrefixList

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

调试

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

调试

授权信息

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

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

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

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

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

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

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

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

操作

访问级别

资源类型

条件关键字

关联操作

cen:CreateTransitRouterPrefixListAssociation

create

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

ClientToken

string

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

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

说明

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

123e4567-e89b-12d3-a456-4266****

RegionId

string

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

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

cn-hangzhou

TransitRouterId

string

转发路由器实例 ID。

tr-6ehx7q2jze8ch5ji0****

NextHopType

string

下一跳类型。取值:

  • BlackHole:表示指定前缀列表下的网段均为黑洞路由,所有去往前缀列表下网段的流量均会被丢弃。

  • VPC:表示指定前缀列表下网段的下一跳为专有网络 VPC(Virtual Private Cloud)连接。

  • VBR:表示指定前缀列表下网段的下一跳为边界路由器 VBR(Virtual Border Router)连接。

  • TR:表示指定前缀列表下网段的下一跳为跨地域连接。

  • ECR:表示指定前缀列表下网段的下一跳为专线网关 ECR(Express Connect Router)实例。

VPC

PrefixListId

string

前缀列表 ID。

pl-6ehtn5kqxgeyy08fi****

TransitRouterTableId

string

转发路由器路由表 ID。

vtb-6ehgc262hr170qgyc****

NextHop

string

下一跳连接 ID。

如果要使前缀列表下的网段均为黑洞路由,本参数需输入 BlackHole

tr-attach-flbq507rg2ckrj****

OwnerUid

integer

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

1210123456123456

DryRun

boolean

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

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

  • false(默认值):发送正常请求,通过检查后直接创建绑定关系。

说明

本参数当前不生效。

false

返回参数

名称

类型

描述

示例值

object

返回结果。

RequestId

string

请求 ID。

0C2EE7A8-74D4-4081-8236-CEBDE3BBCF50

示例

正常返回示例

JSON格式

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

错误码

HTTP status code

错误码

错误信息

描述

400 NoPermission.AliyunServiceRolePolicyForCEN You 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权限。
400 ResourceNotSupport.CCN CCN not support prefix list. CCN不支持prefix list。
400 ResourceNotFound.PrefixlistCidrs Can not find any cidr of specified prefix list. prefix list不存在cidr。
400 ResourceNotFound.Nexthop The specified nexthop instance is not exsit. 参数中指定的nexthop不存在。
400 ResourceExisted.PrefixlistAssociation The prefix list has been already associated with this route table. prefix list已与路由表绑定。
400 ResourceNotFound.PrefixlistAssociation The prefix list is not associated with this route table.
400 ResourceConflict.Route Some of the prefixes of the prefix list are conflicted with exsited routes.
400 MultipleFound.PrefixlistAssociation multiple same prefix association record found. 系统异常,系统中存在多个相同的记录。
400 QuotaReached.Route The quota of the route table is not enough for the request prefix list.
400 InvalidStatus.PrefixlistAssociation The prefix list association is not in a valid state for the operation. 当前PrefixlistAssociation状态不支持该操作,请稍后重试。
400 NotSupport.TrType The basic tr type is not support for this operation. 基础版转发路由器不支持该操作。
400 InvalidValue.PrefixlistCidr Invalid cidr exist in the specified prefixlist. prefixlist中存在不合法的cidr。
400 ResourceNotSupport.Nexthop The specified nexthop instance type is not support for the operation. 参数中指定的nexthop不支持该操作。
400 ResourceMismatch.Nexthop The specified nexthop and nexthop type mismatched. 参数中指定的nexthopnexthopType有误。
400 ResourceNotFound.PrefixList The specified prefixlist does not found. 参数中指定的prefixlist不存在。
400 OperationDenied.SystemPrefixList SystemPrefixList can not be operated. SystemPrefixList不允许操作。
400 OperationFailed.OperateShareResource Operate share prefixlist failed. 共享prefixlist失败。
400 InvalidStatus.Prefixlist Prefixlist is not in a operate status. 当前Prefixlist状态不支持该操作。
400 RegionNotSupport.Prefixlist Prefixlist association are not supported in this region. 当前地域不支持该功能。
400 OperationFailed.TransitRouterNotExist Operation failed because transit router not exist. 转发路由器不存在。
400 IncorrectStatus.RouteTable RouteTable status is invalid. 当前操作涉及的路由表状态不是稳态,无法操作。
400 IllegalParam.TransitRouterTableId The specified Route Table ID is invalid. 路由表ID不合法。
400 OperationDenied.ECSPrefixList Associate ECS PrefixList is not supported. 不支持关联ECS前缀列表。
400 InvalidParameter Invalid parameter. 参数不合法。
400 Unauthorized The AccessKeyId is unauthorized. 账号无权限操作。
404 InvalidRouteTableId.NotFound The specified RouteTableId is not found. RouteTableId不存在。

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

变更历史

更多信息,参考变更详情