You need to enable JavaScript to run this app.
导航

PublishCenRouteEntry

最近更新时间2024.01.08 19:43:54

首次发布时间2022.11.03 08:40:37

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

使用说明

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

请求参数

参数名称类型是否必选示例值说明
ActionStringPublishCenRouteEntry要执行的操作,取值为PublishCenRouteEntry。
VersionString2020-04-01API版本信息,当前版本为2020-04-01。
CenIdStringcen-2nim00ybaylts7trquyzt****云企业网实例的ID。您可以调用DescribeCens接口获取云企业网实例ID。

InstanceType

String

VPC

待发布路由所属的网络实例类型。

  • VPC:私有网络。
InstanceRegionIdStringcn-beijing待发布路由所属的地域。
InstanceIdStringvpc-vtbnbb04qw3k2hgi12cv****待发布路由所属的网络实例ID。您可以调用DescribeVpcs接口获取“VPC”类型网络实例的ID。
DestinationCidrBlockString10.XX.XX.0/24待发布路由的目标网段。

返回参数

参数名称类型示例值描述
RequestIdString20211222122528010225****请求ID。

请求示例

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": {}
}

错误码

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

http code错误码错误信息描述信息
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.指定的云企业网实例所处的状态无法响应该请求,请稍后再试。