Modifies the name, next hop, and description of a custom route.
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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:ModifyRouteEntry | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | 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 |
RouteEntryName | string | No | The name of the route entry. The name must be 1 to 128 characters in length, and cannot start with | EntryName |
RouteEntryId | string | Yes | The ID of the custom route entry. | rte-acfvgfsghfdd**** |
Description | string | No | The description of the route entry. The description must be 1 to 256 characters in length, and cannot start with | EntryDescription |
NewNextHopType | string | No | The new next hop type of the route. Enumeration Value:
| NetworkInterface |
NewNextHopId | string | No | The ID of the new next hop instance. | eni-bp17y37ytsenqyim**** |
RouteTableId | string | No | The ID of the route table to which the route entry belongs. | vtb-bp1nk7zk65du3pni8z9td |
DestinationCidrBlock | string | No | 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
Examples
Sample success responses
JSON
format
{
"RequestId": "861E6630-AEC0-4B2D-B214-6CB5E44B7F04"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidRouteEntryId.NotFound | Specified RouteEntryId does not exist. | The specified route is not found. |
400 | InvalidRouteEntryName.Malformed | Specified RouteEntry name is not valid. | The new name of the route is invalid. |
400 | InvalidRouteEntryId.NotFound | The specified routeEntry does not exist. | The specified routeEntry does not exist. |
400 | OperationDenied.ModifyManagedRouteEntry | The operation is not allowed because of route entry is managed. | Hosted route cannot be modified. |
400 | OperationDenied.RouteTableTypeNotPermitted | The operation is not allowed because the type of route table is not permitted. | You cannot create routes for route tables of the specified type. |
400 | MissingParam.NewNextHopId | The parameter NewNextHopId is mandatory. | The next hop instance ID is not specified when you modify the next hop. |
400 | IllegealParam.NextHopType | The parameter NewNextHopType is illegal. | The next hop type is invalid. |
400 | UnsupportedFeature.NormalTypeNatGateway | Normal 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. |
400 | UnsupportedFeature.NextHopType | The route type does not support modifying the next hop of the route. | You cannot modify the next hop of the route. |
400 | InvalidRouteTable.NotFound | The specified routetable does not exist. | The route table is not found. |
400 | InvalidNetworkInterface.NotFound | The specified network interface does not exist. | The ID of the next hop ENI is not found. |
400 | OperationDenied.NextHopExist | The operation is not allowed because the nexthop already exists. | The next hop of the destination-based route that you want to modify already exists. |
400 | MissingParam.NewNextHopType | The parameter NewNextHopType is mandatory. | The next hop type is not specified when you modify the next hop. |
400 | UnsupportedFeature.ModifyRouteEntryNextHop | The current region does not support the function of modifying the route next hop. | You cannot modify next hops in the current region. |
400 | IncorrectRouteEntryStatus | Some route entry status blocked this operation. | The operation is not supported because the route table contains routes in the Pending or Modifying state. |
400 | ResourceNotFound.VSwitch | The vSwitch where the specified networkinterface is located does not exist. | The switch where the ENI is located does not exist. |
400 | MissingParam.RouteEntryId | The param of %s is missing. | Missing required parameters |
400 | IllegalParam.RouteEntryName | The param of %s is illegal. | The specified route name is invalid. |
400 | OperationDenied.LocalRouteEntryModified | The next hop of a local route is modified. | The next hop of the local type route has been modified. |
400 | OperationDenied.IllegalNewNextHopType | When 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. |
400 | OperationDenied.LocalRouteEntryModified | 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. | 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. |
400 | UnsupportedFeature.VpcAdvancedFeature | The VPC does not support some advanced features. | The VPC does not support some advanced features. Please submit a ticket. |
400 | UnsupportedRegion | The feature is not supported in current region. | The feature is not supported in the current region. |
400 | OperationFailed.NotSupportIPV6 | The specified next hop does not support IPv6. | The specified next hop does not support IPv6. |
403 | Forbbiden | User not authorized to operate on the specified resource. | User not authorized to operate on the specified resource. |
404 | ResourceNotFound.NatGateway | The specific NAT gateway is not found. | The specific NAT gateway is not found. |
404 | ResourceNotFound.GatewayLoadBalancerEndpoint | GatewayLoadBalancerEndpoint instance not found. | GatewayLoadBalancerEndpoint instance not found. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-06 | The Error code has changed | View Change Details |
2024-10-28 | The Error code has changed | View Change Details |
2024-09-29 | The Error code has changed | View Change Details |
2024-09-13 | The Error code has changed | View Change Details |
2024-09-06 | The Error code has changed | View Change Details |
2024-09-03 | The Error code has changed | View Change Details |
2024-08-29 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-06-05 | The Error code has changed | View Change Details |
2024-05-23 | The Error code has changed | View Change Details |
2024-03-25 | The Error code has changed | View Change Details |
2023-12-25 | The Error code has changed | View Change Details |
2023-09-15 | The Error code has changed | View Change Details |
2023-09-15 | API Description Update. The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-05-08 | The Error code has changed | View Change Details |