You need to enable JavaScript to run this app.
导航
PublishCenRouteEntry
最近更新时间:2024.07.24 11:58:07首次发布时间:2022.11.03 08:40:37

调用 PublishCenRouteEntry 接口,发布指定的网络实例路由条目到云企业网。

使用说明

当前仅支持发布VPC系统路由表中的路由条目到云企业网中,包括目标网段为子网网段的系统路由条目和下一跳为云服务器、高可用虚拟IP和NAT网关的自定义路由条目。

调试

请求参数

参数名称
类型
是否必选
示例值
描述
ActionStringPublishCenRouteEntry要执行的操作,取值为PublishCenRouteEntry。
VersionString2020-04-01API版本信息,当前版本为2020-04-01。

CenId

String

cen-2nim00ybaylts7trquyzt****

云企业网实例的ID。
您可以调用 DescribeCens 接口,查询云企业网实例ID。

InstanceRegionIdStringcn-beijing地域。

InstanceType

String

VPC

网络实例类型。

  • VPC:私有网络。

InstanceId

String

vpc-vtbnbb04qw3k2hgi12cv****

网络实例ID。
您可以调用 DescribeVpcs 接口,查询“VPC”类型网络实例的ID。

DestinationCidrBlockString10.XX.XX.0/24目标网段。

返回参数

本接口无特有的返回参数。更多信息请见返回结构

请求示例

GET /?Action=PublishCenRouteEntry&Version=2020-04-01&CenId=cen-2nim00ybaylts7trquyzt****&InstanceType=VPC&InstanceRegionId=cn-beijing&InstanceId=vpc-vtbnbb04qw3k2hgi12cv****&DestinationCidrBlock=10.XX.XX.0/24 HTTP/1.1
Host: open.volcengineapi.com
Service: cen
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20211222122528010225****",
        "Action": "PublishCenRouteEntry",
        "Version": "2020-04-01",
        "Service": "cen",
        "Region": "cn-beijing"
    },
    "Result": {}
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

HttpCode
错误码
错误信息
描述
400InvalidCenAttachedInstance.MalformedThe specified instance type is malformed.指定的网络实例类型不支持。
400InvalidCenRouteEntry.ExistedThe specified route entry has been published to CEN.指定的路由已经发布到云企业网路由表中,不能重复发布。
400UnsupportedOperationThe specified route entry does not support being published.指定路由不支持发布到云企业网路由表中。
400QuotaExceeded.CenRouteEntryYou've reached the number of route entries can be published to CEN.已达到云企业网路由条目数量的配额上限。
400InvalidCidr.MalformedThe specified cidr block is malformed.指定的网段格式不合法。
403Forbidden.PublishCenRouteEntryYou are not authorized to publish route entry to CEN.无权限对指定的路由进行发布操作。
403Forbidden.PublishIPv6CenRouteEntryYou are not authorized to publish IPv6 route entry to CEN.无权限对指定的IPv6路由进行发布操作。
404InvalidCen.NotFoundThe specified CEN does not exist.指定的云企业网实例不存在。
404InvalidCenAttachedInstance.NotFoundThe specified CEN attached instance does not exist.指定的网络实例不存在。
404InvaildRouteEntry.NotFoundThe specified route entry does not exist in the instance.在网络实例中找不到指定的路由。
409InvalidCen.InvalidStatusThe specified CEN instance is not in the correct status for the request.指定的云企业网实例所处的状态无法响应该请求,请稍后再试。