Publishes a VPN route to a VPC.


Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
Action String Yes PublishVpnRouteEntry

The name of this action. Value: PublishVpnRouteEntry.

NextHop String Yes vco-bp15oes1py4i66rmd****

The next hop of the VPN route.

PublishVpc Boolean Yes true

Indicates whether to publish the VPN route to the VPC. Valid values:

  • true: The VPN route is published to the VPC.
  • false: The VPN route is not published to the VPC.
RegionId String Yes cn-hangzhou

The ID of the region to which the VPN route belongs. To query the region ID, call DescribeRegions.

RouteDest String Yes

The destination CIDR block of the VPN route.

RouteType String Yes pbr

The type of the VPN route. Valid values:

  • pbr: policy route.
  • dbr: destination route.
VpnGatewayId String Yes vpn-bp1a3kqjiiq9legfx****

The ID of the VPN Gateway.

ClientToken String No d7d24a21-f4ba-4454-9173-b3828dae492b

The client token used to guarantee the idempotence of the request.

The value of this parameter is generated by the client and must be unique among different requests. It must be 1 to 64 ASCII characters in length.

Response parameters

Parameter Type Example value Description
RequestId String 5BE01CD7-5A50-472D-AC14-CA181C5C03BE

The ID of the request.


Request example

http(s)://[Endpoint]/? Action=PublishVpnRouteEntry

Response example

XML format


JSON format



HTTP status code Error code Error message Description
403 Forbidden.SubUser User not authorized to operate on the specified resource as your account is created by another user. You are not authorized to use this resource. Apply for the permission and try again.
403 Forbidden User not authorized to operate on the specified resource. You are not authorized to use this resource. For more information, open a ticket.
400 Resource.QuotaFull The quota of resource is full. The resource quota has been reached.
404 InvalidVpnGatewayInstanceId.NotFound The specified vpn gateway instance id does not exist. The specified VPN Gateway does not exist.
400 VpnGateway.Configuring The specified service is configuring. The specified service is being configured.
400 VpnGateway.FinancialLocked The specified service is financial locked. The specified service is locked due to insufficient account balance.

For a list of error codes, visit the API Error Center.