All Products
Search
Document Center

Virtual Private Cloud:PublishVpcRouteEntries

更新時間:Oct 27, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Publish VPC Routes

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:PublishVpcRouteEntriesupdate
*RouteTable
acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the instance is located. You can obtain the region ID by calling the DescribeRegions interface.

cn-hangzhou
RouteEntriesarray<object>No

List of route entries to be published, supporting up to 50 routes at most.

objectNo

List of route entry information to be published.

RouteTableIdstringYes

The ID of the route table for the route entry.

vtb-2ze3jgygk9bmsj23s****
DestinationCidrBlockstringYes

The destination CIDR block for the route entry.

121.41.165.123/32
TargetTypestringYes

The type of the target for route publication.

ECR
TargetInstanceIdstringYes

The ID of the target instance for route publication.

ecr-dhw2xsds5****
DryRunbooleanNo

Indicates whether to perform a dry run of this request. Values:

  • true: Sends a check request without publishing the route. The checks include whether the AccessKey is valid, the authorization status of the RAM user, and if all required parameters are filled out. If the check fails, the corresponding error is returned. If the check passes, the DryRunOperation error code is returned.

  • false (default): Sends a normal request. After passing the check, it returns a 2xx HTTP status code and directly queries the resource status.

false

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

980960B0-2969-40BF-8542-EBB34FD358AB

Examples

Sample success responses

JSONformat

{
  "RequestId": "980960B0-2969-40BF-8542-EBB34FD358AB"
}

Error codes

HTTP status codeError codeError messageDescription
400IncorrectStatus.VpcThe status of %s [%s] is incorrect.The instance is in an invalid state.
400ResourceNotFound.RouteEntryThe specified resource routeEntry is not found.The specified route entry does not exist
400IncorrectStatus.RouteEntryThe status of %s [%s] is incorrect.Route entry is in non-steady state
400Forbidden.OperateCustomRouteTableThe operation is forbidden because publish route entry in custom route table.The operation is prohibited because it is not allowed to publish route entries in the custom route table.
400IncorrectStatus.RouteEntryPublishStatusRoute entry publish status is incorrect.-
400ResourceNotAssociated.TargetInstanceThe target instance is not associated with vpc.The destination instance of the route is not associated with the VPC.
400OperationDenied.UnsupportedTargetTypeThe operation is not allowed because the target type is not supported.The operation was rejected because the type of the route publication target is not currently supported.
400IncorrectStatus.RouteTableThe route table is in an invalid state.The specified routing table is in the wrong state
400OperationUnsupported.PublishSystemRouteEntryPublishing system route entry is unsupported.-
400OperationUnsupported.UnsupportedNextHopUnsupported nexthop type for route entry publish operation.-
400OperationUnsupported.PublishPrefixListRouteEntryPublishing prefix list route entry is unsupported.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history