CreateTransitRouterPeerAttachment - 为企业版转发路由器实例创建跨地域连接

网络实例(VPC、VBR、IPsec连接)被连接至转发路由器后,如果要实现不同地域网络实例的互通,需要在网络实例连接的转发路由器下创建跨地域连接,您可以调用CreateTransitRouterPeerAttachment接口为企业版转发路由器实例创建跨地域连接。

接口说明

  • 企业版转发路由器支持以下两种带宽分配方式:

    • 从带宽包分配

      使用此种分配方式,您需要先购买带宽包,从带宽包中为跨地域连接分配带宽。购买带宽包具体操作,请参见 CreateCenBandwidthPackage

    • 按流量付费

      使用此种分配方式,您需要为跨地域连接设置限速带宽,系统会按照跨地域连接实际使用的流量计费。具体计费信息,请参见跨地域流量

  • CreateTransitRouterPeerAttachment 接口属于异步接口,即系统会先返回一个跨地域连接 ID,但该跨地域连接并未创建完成,系统后台的创建任务仍在进行。您可以调用 ListTransitRouterPeerAttachments 接口查询跨地域连接的状态。

    • 当跨地域连接处于 Attaching 状态时,表示跨地域连接正在创建中,在该状态下,您只能对跨地域连接执行查询操作,不能执行其他操作。

    • 当跨地域连接处于 Attached 状态时,表示跨地域连接创建完成。

调试

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

调试

授权信息

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

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

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

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

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

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

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

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

操作

访问级别

资源类型

条件关键字

关联操作

cen:CreateTransitRouterPeerAttachment

create

CenInstance

acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}

TransitRouter

acs:cen:*:{#accountId}:centransitrouter/{#TransitRouterId}

请求参数

名称

类型

必填

描述

示例值

ClientToken

string

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

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

说明

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

02fb3da4-130e-11e9-8e44-001****

CenId

string

云企业网实例 ID。

cen-j3jzhw1zpau2km****

TransitRouterId

string

本端企业版转发路由器实例 ID。

tr-bp1su1ytdxtataupl****

RegionId

string

本端企业版转发路由器实例所属地域 ID。

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

cn-hangzhou

TransitRouterAttachmentName

string

跨地域连接的名称。

名称可以为空或长度为 1~128 个字符,不能以 http://或 https://开头。

testname

TransitRouterAttachmentDescription

string

跨地域连接的描述信息。

描述可以为空或长度为 1~256 个字符,不能以 http://或 https://开头。

testdesc

PeerTransitRouterId

string

对端转发路由器实例 ID。

tr-m5eq27g6bndum7e88****

PeerTransitRouterRegionId

string

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

cn-qingdao

AutoPublishRouteEnabled

boolean

是否使企业版转发路由器自动发布跨地域连接的路由到对端地域。

  • false(默认值):否。

  • true:是。

false

Bandwidth

integer

跨地域连接的带宽值。单位:Mbps。

  • BandwidthType 取值为 BandwidthPackage 时,该参数表示跨地域连接可使用的带宽值。

  • BandwidthType 取值为 DataTransfer 时,该参数表示跨地域连接的限速带宽值。

2

CenBandwidthPackageId

string

跨地域连接要绑定的带宽包 ID。

说明

BandwidthType 取值为 DataTransfer 时,无需配置该项。

cenbwp-3xrxupouolw5ou****

DryRun

boolean

是否对此次请求执行预检,包括权限、实例状态校验等。取值:

  • false(默认值):发送正常请求,通过检查后直接创建跨地域连接。

  • true:发送检查请求,只进行校验,不会创建跨地域连接。检查项包括是否填写了必需参数、请求格式等。如果检查不通过,则返回对应错误。如果检查通过,则返回对应请求 ID。

false

BandwidthType

string

跨地域连接的带宽分配方式。取值:

  • BandwidthPackage:从带宽包中分配带宽。

  • DataTransfer:不为跨地域连接分配带宽,按使用流量计费。

BandwidthPackage

Tag

array

标签信息。

一次最多支持输入 20 个标签信息。

object

Key

string

资源的标签键。

一旦传入该值,则不允许为空字符串。最多支持 64 个字符,不能以aliyun或者acs:开头,不能包含http://或者https://

一次最多支持输入 20 个标签的标签键。

tag_A1

Value

string

资源的标签值。

标签值可以为空或输入不超过 128 个字符的字符串,不能以aliyun或者acs:开头,不能包含http://或者https://

每一个标签键对应一个标签值,一次最多支持输入 20 个标签键对应的标签值。

value_A1

DefaultLinkType

string

默认链路类型。

可选值为 Platinum(铂金),Gold(金),默认为 Gold(金)。

且仅在带宽分配方式是按流量计费时,才可以配置为 Platinum(铂金)。

Gold

返回参数

名称

类型

描述

示例值

object

返回结果。

TransitRouterAttachmentId

string

跨地域连接 ID。

tr-attach-nwkiqfvw22qesz****

RequestId

string

请求 ID。

59422BF5-BAAD-4CFD-9019-9557BD3ACFA3

示例

正常返回示例

JSON格式

{
  "TransitRouterAttachmentId": "tr-attach-nwkiqfvw22qesz****",
  "RequestId": "59422BF5-BAAD-4CFD-9019-9557BD3ACFA3"
}

错误码

HTTP status code

错误码

错误信息

描述

400 OperationUnsupported.TransitRouterRegionId The specified TransitRouterRegion does not support the operation.
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 InvalidTransitRouterId.NotFound TransitRouterId is not found. 转发路由实例ID不存在。
400 IllegalParam.PeerTransitRouterId PeerTransitRouterId is illegal. 跨地域连接时,对端的转发路由器ID非法。
400 OperationUnsupported.TransitRouterId TransitRouterId is unsupported. 转发路由器类型是基础版时不支持。
400 MissingParam.Bandwidth The parameter Bandwidth is mandatory. 带宽值参数是必需的。
400 IllegalParam.Bandwidth Bandwidth is illegal. 带宽包ID不合法。
400 Forbbiden.TransitRouterServiceNotOpen The user has not open transit router service. 转发路由器服务未打开,请打开后重试。
400 OperationUnsupported.TransitRouterType The specified TransitRouterType does not support the operation. 当前TransitRouter类型不支持该操作。
400 OperationUnsupported.BandwidthType The specified BandwidthType does not support the operation. 当前BandwidthType不支持该操作。
400 InvalidCenId.NotFound CenId is not found. CEN实例不存在。
400 IllegalParam.BandwidthType BandwidthType is illegal. 带宽包类型不合法。
400 MissingParam.CenIdOrRegionId Either CenId or RegionId must be specified. CenId或者RegionId是必选参数。
400 OperationUnsupported.BandwidthHS This bandwidth limit can only be set in China-AsiaPacific-HS
400 OperationUnsupported.CenFullLevel CEN full level does not support TransitRouter Full类型CEN不支持创建企业版转发路由器。
400 OperationUnsupported.CloudDataTransferService CCN region not support cloud data transfer service. CCN地域中不支持cloud data transfer服务。
400 InvalidPeerTransitRouterId.NotFound The specified PeerTransitRouterId is not found. 参数中指定的PeerTransitRouterId不存在。
400 IllegalParam.RegionId RegionId is illegal. 参数中指定的Region不合法。
400 IllegalParam.PeerRegionId PeerRegionId is illegal. 参数中指定的PeerRegionId不合法。
400 IllegalParam.TransitRouterRegionId TransitRouterRegionId is illegal. TransitRouterRegionId不合法。
400 InvalidOperation.CenInstanceStatus The CEN instance is not in a valid state for the operation.
400 IncorrectStatus.TransitRouter The status of TransitRouter is incorrect. 当前TransitRouter的状态不支持该操作,请稍后重试。
400 InvalidOperation.BwpNotAssociated Operation is invalid because a bandwidth package corresponding to the geographic span is not associated. 与地域对应的带宽包未关联,无法操作。
400 InvalidOperation.BwpBusinessStatus The CBN bandwidth package is not in a valid business state for the operation. 带宽包不处于稳态,无法操作。
400 IllegalParam.CenBandwidthPackageId Parameter CenBandwidthPackageId is illegal. 参数中指定的CenBandwidthPackageId不合法。
400 InvalidOperation.BwpBandwidthExceeded Operation is invalid because the total bandwidth limit has exceeded that of the bandwidth package.
400 ParameterIllegal.CdtDefaultLinkTypeOnlySupportPlatinumOrGold DataTransfer only support Platinum and Gold. 带宽分配方式为按流量计费时,默认链路类型仅支持铂金(Platinum)和金(Gold)。
400 ParameterIllegal.BandwidthPackageDefaultLinkTypeOnlySupportGold Cen bandwidthPackage only support Gold. 带宽分配方式为带宽包时,默认链路类型仅支持金(Gold)
400 ParameterIllegal.CdtDefaultLinkTypeOnlySupportGold CDT only support Gold when both transitrouters for cross regional connections are not all enterprise version. 当跨地域连接的两端转发路由器不全是企业版且带宽分配方式为按流量计费时,默认链路类型仅支持金(Gold)。
400 OperationNotAllowed.DefaultLinkTypeOnlySupportGold Operation is not allowed because this user can only set default link type to Gold. 本用户只能设置默认链路类型为金。
400 OperationInvalid.UserCanNotBuyCrossBorderBwp According to the laws and regulations of the operator and mainland China, you are currently not eligible to purchase or renew a cross-border bandwidth package. Please contact online customer service or your business manager for consultation. 根据运营商及中国大陆法律法规的要求,您当前暂不符合购买/续费跨境带宽包条件,请联系在线客服或您的商务经理咨询处理。
400 OperationInvalid.IdentityRegistrationStatusNotSupport Real name registration of enterprises required. 因您在“地域”或“对端地域”选择了“中国内地”的地域,您需要是企业用户且已完成企业实名登记,才能继续购买。关于如何做企业实名登记,请查看实名认证文档
400 InvalidOperation.OnlyOneRegionSupportIpv6 Peer Attachment is only allowed when both regions support IPv6 or do not support IPv6 at all. 只有当两端地域均支持或均不支持IPv6时才可以创建跨地域连接。
400 InvalidOperation Operation is invalid. 非法操作。
400 Forbidden.ResourceOwnerTransitRouterServiceExpired The transit router service of the account to which the resource belongs has been suspended due to arrears. Please notify the other party to renew the service and try again. 资源所属账号的转发路由器服务已欠费停服,请通知对方续费后重试。
400 Forbidden.TransitRouterServiceExpired The transit router service is out of service. 转发路由器服务已欠费停服,请续费后重试。
400 OperationUnsupported.RegionId The specified RegionId does not support the operation. 当前地域不支持该操作。
400 QuotaExceeded.Bandwidth Bandwidth quota exceeded. 带宽值超出配额限制。
400 InvalidParameter Invalid parameter. 参数不合法。
400 Unauthorized The AccessKeyId is unauthorized. 账号无权限操作。
400 InvalidParameter.PeerTransitRouterId The specified parameter PeerTransitRouterId is invalid.
400 InvalidParameter.ResourceType The specified parameter ResourceType is invalid.

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

变更历史

更多信息,参考变更详情