All Products
Search
Document Center

Virtual Private Cloud:ModifyRouteEntry

Last Updated:Dec 20, 2024

Modifies the name and description of a custom route entry.

Operation description

You cannot repeatedly call the ModifyRouteEntry operation to modify the name and description of a custom route within the specified period of time.

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:
    • The required resource types are displayed in bold characters.
    • 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:ModifyRouteEntryupdate
*RouteTable
acs:vpc:{#regionId}:{#accountId}:routetable/{#RouteTableId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region to which the route belongs.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
RouteEntryNamestringNo

The name of the route entry.

The name must be 1 to 128 characters in length, and cannot start with http:// or https://.

EntryName
RouteEntryIdstringYes

The ID of the custom route entry.

rte-acfvgfsghfdd****
DescriptionstringNo

The description of the route entry.

The description must be 1 to 256 characters in length, and cannot start with http:// or https://.

EntryDescription
NewNextHopTypestringNo

The new next hop type of the route.

Enumeration Value:
  • NetworkInterface: NetworkInterface.
  • NatGateway: NatGateway.
NetworkInterface
NewNextHopIdstringNo

The ID of the new next hop instance.

eni-bp17y37ytsenqyim****
RouteTableIdstringNo

The ID of the route table to which the route entry belongs.

vtb-bp1nk7zk65du3pni8z9td
DestinationCidrBlockstringNo

The destination CIDR block of the route entry. Only IPv4 CIDR blocks, IPv6 CIDR blocks, and prefix lists are supported.

192.168.0.0/24

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

861E6630-AEC0-4B2D-B214-6CB5E44B7F04

Examples

Sample success responses

JSONformat

{
  "RequestId": "861E6630-AEC0-4B2D-B214-6CB5E44B7F04"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidRouteEntryId.NotFoundSpecified RouteEntryId does not exist.The specified route is not found.
400InvalidRouteEntryName.MalformedSpecified RouteEntry name is not valid.The new name of the route is invalid.
400InvalidRouteEntryId.NotFoundThe specified routeEntry does not exist.The specified routeEntry does not exist.
400OperationDenied.ModifyManagedRouteEntryThe operation is not allowed because of route entry is managed.Hosted route cannot be modified.
400OperationDenied.RouteTableTypeNotPermittedThe operation is not allowed because the type of route table is not permitted.You cannot create routes for route tables of the specified type.
400MissingParam.NewNextHopIdThe parameter NewNextHopId is mandatory.The next hop instance ID is not specified when you modify the next hop.
400IllegealParam.NextHopTypeThe parameter NewNextHopType is illegal.The next hop type is invalid.
400UnsupportedFeature.NormalTypeNatGatewayNormal nat gateways do not support modifying the next hop of the route.You cannot modify the next hop of a route that points to a standard NAT gateway.
400UnsupportedFeature.NextHopTypeThe route type does not support modifying the next hop of the route.You cannot modify the next hop of the route.
400InvalidRouteTable.NotFoundThe specified routetable does not exist.The route table is not found.
400InvalidNetworkInterface.NotFoundThe specified network interface does not exist.The ID of the next hop ENI is not found.
400OperationDenied.NextHopExistThe operation is not allowed because the nexthop already exists.The next hop of the destination-based route that you want to modify already exists.
400MissingParam.NewNextHopTypeThe parameter NewNextHopType is mandatory.The next hop type is not specified when you modify the next hop.
400UnsupportedFeature.ModifyRouteEntryNextHopThe current region does not support the function of modifying the route next hop.You cannot modify next hops in the current region.
400IncorrectRouteEntryStatusSome route entry status blocked this operation.The operation is not supported because the route table contains routes in the Pending or Modifying state.
400ResourceNotFound.VSwitchThe vSwitch where the specified networkinterface is located does not exist.The switch where the ENI is located does not exist.
400MissingParam.RouteEntryIdThe param of %s is missing.Missing required parameters
400IllegalParam.RouteEntryNameThe param of %s is illegal.The specified route name is invalid.
400OperationDenied.LocalRouteEntryModifiedThe next hop of a local route is modified.The next hop of the local type route has been modified.
400OperationDenied.IllegalNewNextHopTypeWhen modifying the next hop of a route of the local type, a new next hop type that is not supported is passed in.When modifying the next hop of a route of the local type, a new next hop type that is not supported is passed in.
400OperationDenied.LocalRouteEntryModifiedWhen you modify the next hop of a Local route in a custom routing table, the destination CIDR block of the Local route is exactly the same as the Cidr of a VSwitch bound to the routing table.When you modify the next hop of a Local route in a custom routing table, the destination CIDR block of the Local route is exactly the same as the Cidr of a VSwitch bound to the routing table.
400UnsupportedFeature.VpcAdvancedFeatureThe VPC does not support some advanced features.The VPC does not support some advanced features. Please submit a ticket.
400UnsupportedRegionThe feature is not supported in current region.The feature is not supported in the current region.
400OperationFailed.NotSupportIPV6The specified next hop does not support IPv6.The specified next hop does not support IPv6.
403ForbbidenUser not authorized to operate on the specified resource.User not authorized to operate on the specified resource.
404ResourceNotFound.NatGatewayThe specific NAT gateway is not found.The specific NAT gateway is not found.
404ResourceNotFound.GatewayLoadBalancerEndpointGatewayLoadBalancerEndpoint instance not found.GatewayLoadBalancerEndpoint instance not found.

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

Change history

Change timeSummary of changesOperation
2024-11-19The Error code has changedView Change Details
2024-11-06The Error code has changedView Change Details
2024-10-28The Error code has changedView Change Details
2024-09-29The Error code has changedView Change Details
2024-09-13The Error code has changedView Change Details
2024-09-06The Error code has changedView Change Details
2024-09-03The Error code has changedView Change Details
2024-08-29The Error code has changed. The request parameters of the API has changedView Change Details
2024-06-05The Error code has changedView Change Details
2024-05-23The Error code has changedView Change Details
2024-03-25The Error code has changedView Change Details
2023-12-25The Error code has changedView Change Details
2023-09-15The Error code has changedView Change Details
2023-09-15API Description Update. The Error code has changed. The request parameters of the API has changedView Change Details
2023-05-08The Error code has changedView Change Details