文档

PublishVpnRouteEntry - 发布或者撤销VPN路由

更新时间:

调用PublishVpnRouteEntry接口将目的路由或策略路由发布到VPC的系统路由表中或将已发布的目的路由或策略路由从VPC系统路由表中撤销。

调试

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

授权信息

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

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

请求参数

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

VPN 网关实例所在的地域 ID。

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

cn-hangzhou
ClientTokenstring

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

由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符。

说明 若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。
d7d24a21-f4ba-4454-9173-b382****
VpnGatewayIdstring

VPN 网关实例 ID。

vpn-bp1a3kqjiiq9legfx****
RouteDeststring

VPN 网关路由条目的目标网段。

10.0.0.0/24
NextHopstring

VPN 网关路由条目的下一跳。

vco-bp15oes1py4i66rmd****
RouteTypestring

VPN 网关路由条目类型。取值:

  • pbr:策略路由。

  • dbr:目的路由。

pbr
PublishVpcboolean

发布或撤销路由。取值:

  • true:发布。

    该参数取值为 true,表示将目的路由或策略路由发布到 VPC 的系统路由表中。

  • false:撤销。

    该参数取值为 false,表示将已发布的目的路由或策略路由从 VPC 系统路由表中撤销。

true

返回参数

名称类型描述示例值
object

返回结果。

RequestIdstring

请求 ID。

5BE01CD7-5A50-472D-AC14-CA181C5C03BE

示例

正常返回示例

JSON格式

{
  "RequestId": "5BE01CD7-5A50-472D-AC14-CA181C5C03BE\t"
}

错误码

HTTP status code错误码错误信息描述
400Resource.QuotaFullThe quota of resource is full资源配额已达上限。
400VpnGateway.ConfiguringThe specified service is configuring.服务正在配置中,请您稍后再试。
400VpnGateway.FinancialLockedThe specified service is financial locked.该服务已欠费,请您先充值再操作。
400VpnRouteEntry.AlreadyExistsThe specified route entry is already exist.该路由已存在。
400VpnRouteEntry.ConflictThe specified route entry has conflict.路由条目存在冲突。
400InvalidVpnRouteEntry.NotFoundThe specified route entry does not exist.指定的路由条目不存在。
400OperationFailed.InvalidStatusRoute entry is not allowed to operate in current status.当前状态下禁止操作该路由条目。
400OperationFailed.RouteConflictOperation failed because there is already a route in VPC route table to another VPN on the same network block.在VPC路由表中同一网段上已经存在一条指向另一个VPN网关的路由。
400OperationFailed.InvalidCidrBlockOperation failed because the specified network block is invalid.网段不合法。
400OperationFailed.RouteConflictOperation failed because there is already a route in VPC route table to a non-RI and non-VPN next hop on the same network block.在VPC路由表中同一网段上已经存在一条指向RI、VPN网关之外其他资源的路由。
400QuotaExceeded.VpnRouteEntryThe number of route entries to the VPN gateway in the VPC routing table has reached the quota limit.VPC路由表中指向VPN网关的路由条目已经达到配额限制。
400TaskConflictThe operation is too frequent, please wait a moment and try again.操作过于频繁,请稍等一会再重试
400IllegalParam.CidrBlockThe specified CidrBlock is illegal.CidrBlock参数非法。
400QuotaExceededRoute entry quota exceeded in this route table.超过路由条目配额。
400MissingParameterMiss mandatory parameter.缺少必要参数,请您检查必填参数是否都已填后再进行操作。
400InvalidCidrBlock.MalformedSpecified CIDR block is not valid.该CIDR格式不正确。
400InvalidCIDRBlock.DuplicateSpecified CIDR block is already exists.该网段已经在该路由表中存在。
400IncorrectVpcStatusCurrent VPC status does not support this operation.当前VPC的状态无法支持这个操作。
400IncorrectInstanceStatusCurrent instance status does not support this operation.当前实例的状态不支持该操作。
400IncorrectRouteEntryStatusSome route entry status blocked this operation.无法执行该操作,当前路由表中有路由条目的状态为pending或modifying。
400IncorrectVSwitchStatusThe current virtual switch status does not support this operation.该vSwitch处于pending状态,无法删除。
400InvalidCidrBlockSpecified CIDR block is not valid.可能的报错原因:1.您不在10.0.0.0/8的路由网段的白名单中,不能使用该网段。2.添加的自定义路由目标网段不能从属于同一个VPC下面所有交换机的网段。3.网段不能是100.64.0.0/10。
400InvalidNextHopTypeSpecified parameter "NextHopType" is not valid该下一跳类型不合法。
400InvalidNextHop.NotFoundSpecified next hop does not exist.该下一跳地址不存在。
400InvalidVRouter.NotFoundvRouter not exists.路由器不存在,请您检查输入的路由器是否正确。
400InvalidVPC.NotFoundvpc not exists.专有网络不存在,请您检查输入的专有网络是否正确。
400InvalidNexthopTypeAndList.BothNullboth nexthopType and nextHopList are null.下一跳类型和下一跳列表都为空。
400InvalidNexthopTypeAndList.BothNotNullboth nexthopType and nextHopList are not null.下一跳类型和下一跳列表不能同时为空。
400InvalidRouterInterfaceinvalid router interface.该路由器接口不存在。
400InvalidOppositeRouterTypenexthop list cannot only contain router interface whose opposite router interface is on vbr.下一跳的路由器接口的对端路由器类型必须为边界路由器。
400InvalidNexthopListSizenexthop size is illegal. Must be between 2 and 4.必须指定2~4个路由器接口作为下一跳。
400InvalidEntryRuleQuota.NotFoundRoute entry quota rule not exists.路由条目配额规则不存在。
400Forbidden.CheckEntryRuleQuotaRoute entry quota rule check error.检查路由条目配额时发生了错误。
400InvalidVBRStatusinvalid virtual border router status.边界路由器状态不合法。
400InvalidPhysicalConnectionBusinessStatusinvalid physical connection business status.物理专线状态不合法。
400IncorrectHaVipStatusThis operation is denied because satus of the specified HaVip is neither Available nor InUse.无法执行该操作,因为HaVip的状态是Available或InUse。
400CountLimitExceed.HaVipRouteEntryThere can be 5 route entry to HaVip at most in one route table.指向该HaVip实例的路由条目数量已达上限。
400InvalidRouteEntry.DuplicateThe route entry already exist.指定的路由条目已存在。
400IncorrectRouteEntryStatusSpecified routeEntry status error.无法执行该操作,当前路由表中有路由条目的状态为pending或modifying。
400IncorrectRouteEntryStatusVBR has NotStable route entry.无法执行该操作,边界路由表中有路由条目的状态为pending或modifying。
400INVALID_WEIGHT_PARAMSpecified value of weight invalid该权重不合法。
400FORBIDDEN_USE_VPC_AS_INTERNET_GATEWAYThe Specified CIDR must be in vpc CIDR.该网段必须是VPC网段的子集。
400INVALID_VPC_IDThe Specified VpcId not match.该VPC不存在,请您检查输入的VPC是否正确。
400InvalidRouteEntrySizeThe Specified routerEntry size not legal.等价路由需要选择2~4个路由器接口作为路由下一跳。
400RouteConflict.AlreadyExistRoute conflict exists in routing table.路由表中存在路由冲突。
400InvalidRouteEntryName.MalformedSpecified RouteEntry name is not valid.无法修改,因为指定的路由条目名称无效
400Duplicated.VpcNextHopRoute entry nexthop duplicate.下一个重复的路由条目。
400InvalidNexthop.DirectEniThe direct Eni cannot be nexthop.直通Eni不能作为下一跳
400InvalidAttachment.NotFoundThe attachment is not found.Attachment不存在。
400OperationFailed.ActiveNetworkInterfaceNotFoundNo active network interface is found on the attachment.Attachment上不存在可用的弹性网卡。
400InvalidNetworkInterface.NotFoundThe network interface is not found on the attachment.Attachment上的弹性网卡不存在。
400OperationFailed.QueryAttachmentInfoFailed to query attachment information.查询Attachment信息失败。
400IllegalParam.AttachmentIdThe attachment is invalid.Attachment非法。
400OperationFailed.NotSupportIPV6The specified next hop does not support IPv6.指定的下一跳不支持IPv6功能。
400IncorrectStatus.Ipv6AddressThe IPv6 address of the specified next hop is being assigned or deleted.指定的下一跳的IPv6地址此时正在被创建或删除中。
400OperationUnsupported.Ipv6EntryOnPrimaryNetworkInterfaceYou cannot create IPv6 route entries on a primary network interface.不允许创建下一跳为主网卡的IPv6路由。
400OperationUnsupported.SpecifyIpOnIpv6EntryYou cannot specify the private IP address when you create IPv6 route entries.创建IPv6路由不允许指定private IP参数。
400OperationUnsupported.MutipleIpv6AddressYou cannot specify a next hop that has bound multiple IPv6 addresses.不允许指定绑定了多个IPV6地址的下一跳。
400OperationDenied.Ipv6EntryOnCustomTableYou cannot create any IPv6 route entry on a custom route table.不允许在自定义路由表上创建IPv6路由。
403Forbbiden.SubUserUser not authorized to operate on the specified resource as your account is created by another user.您没有权限操作该资源,请您申请操作权限后再试。
403ForbiddenUser not authorized to operate on the specified resource.您没有权限操作指定资源,请申请权限后再操作。
404InvalidVpnGatewayInstanceId.NotFoundThe specified vpn gateway instance id does not exist.指定的 VPN 网关不存在,请您检查 VPN 网关是否正确。

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

变更历史

变更时间变更内容概要操作
2023-07-21OpenAPI 描述信息更新、OpenAPI 错误码发生变更看变更集
变更项变更内容
API 描述OpenAPI 描述信息更新
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    删除错误码:403
    删除错误码:404
  • 本页导读 (1)
文档反馈