Calls the ModifyRouteEntry operation to modify the name, description, and next hop of a custom route entry.
Operation description
The ModifyRouteEntry operation does not support concurrent modifications to the name and description of the same custom route entry.
The ModifyRouteEntry operation may return the TaskConflict error code in concurrent scenarios. Retry as appropriate.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:ModifyRouteEntry |
update |
*RouteTable
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the route entry. You can call the DescribeRegions operation to query the region ID. |
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 |
No |
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. Valid values:
Valid values:
|
NetworkInterface |
| NewNextHopId |
string |
No |
The new next hop instance ID of the route. |
eni-bp17y37ytsenqyim**** |
| RouteTableId |
string |
No |
The route table ID. |
vtb-bp1nk7zk65du3pni8z9td |
| DestinationCidrBlock |
string |
No |
The IPv4 CIDR block of the route entry. IPv4 and IPv6 CIDR blocks are supported. Note
If the RouteEntryId parameter is not specified, the DestinationCidrBlock and RouteTableId parameters are required. To change the IPv4 CIDR block of a route to a prefix list, specify the RouteEntryId parameter. The DestinationCidrBlock parameter does not support prefix list CIDR blocks or prefix list instance IDs. |
192.168.0.0/24 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values: true: sends the request without modifying the route. The system checks whether the AccessKey pair is valid, the authorization of the Resource Access Management (RAM) user, and whether the required parameters are specified. If the check fails, the corresponding error is returned. If the check succeeds, the false (default): sends a Normal request. After the request passes the check, a 2xx HTTP status code is returned and the route is modified. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
861E6630-AEC0-4B2D-B214-6CB5E44B7F04 |
Examples
Success response
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 | 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. | |
| 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 | 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. |
| 400 | UnsupportedFeature.ModifyIpv6RouteEntryNextHop | The current region does not support the feature of modifying the IPv6 route next hop. | The operation failed because the current region does not support modifying the IPv6 route next hop. |
| 400 | OperationDenied.NewNextHopNotSupportPublish | New nexthop is not supported for published route entry. | |
| 400 | IllegalParam.DestCidrBlock | The destCidrBlock is invalid. | The specified destination address is invalid. |
| 400 | IllegalParamFormat.DstCidrBlock | The format of the specified destination CIDR block is invalid. | The error message returned because the format of the destination CIDR block is invalid. |
| 400 | MissingParam.RouteEntryIdOrRouteTableDstCidr | The request is missing required parameters. You must provide either the RouteEntryId or the combination of RouteTableId and DestinationCidrBlock to proceed. Please ensure that one of these parameter sets is included in your request. | The request is missing a required parameter. You must provide RouteEntryId, or both RouteTableId and DestinationCidrBlock. |
| 400 | MissingParam.ParameterMustNotNull | %s, %s. | Missing parameter that must be passed in. |
| 400 | ResourceNotFound.RouteTable | The specified resource gatewayRouteTable is not found. | The gateway route table does not exist. |
| 400 | OperationDenied.UpdateGatewayRouteEntry | The operation is not allowed because of need switch to local first. | The system failed to modify the route. You must first set the next hop to a local route before you can set a custom next hop. |
| 400 | ResourceNotFound.RouteEntry | The specified resource routeEntry is not found. | The specified route entry does not exist |
| 400 | IncorrectStatus.RouteEntry | The status of %s [%s] is incorrect. | Route entry is in non-steady state |
| 400 | IncorrectStatus.Vswitch | The status of %s [%s] is incorrect. | The status of the specified vSwitch is incorrect. |
| 400 | ResourceNotFound.Instance | The specified resource nextHop is not found. | The next hop instance does not exist. |
| 400 | IncorrectStatus.NextHop | The status of %s [%s] is incorrect. | Specified next hop resource |
| 400 | OperationDenied.NextHopTypeNonsupport | The operation is not allowed because of nextHopType is nonsupport. | Specifying the next hop of the resource type is not supported. |
| 400 | OperationDenied.LocalEntryCanOnlyModifyNextHop | Only the nextHop parameter can be modified for a local route entry. | You can modify only the next hop of a local route. |
| 400 | ExclusiveParam.NextHopTypeAndNextHopId | The param of nextHopType and nextHopId are mutually exclusive. | The next hop type does not match the next hop instance. |
| 400 | InvalidRouterInterfaceId.NotFound | The specified RouterInterfaceId does not exist in our record. | |
| 400 | OperationUnsupported.OnlySupportNormalNetworkInterface | Next hop only supports binding normal network Interface. | Next hop only supports binding to common ENIs |
| 400 | UnsupportedFeature.Ipv6GatewayRouteTable | The feature of %s is not supported. | The border gateway route table cannot be associated with the gateway. |
| 400 | OperationDenied.TrAttachmentIpv6Disabled | The operation is not allowed because tr attachment Ipv6 is disabled. | The operation is not allowed because tr attachment Ipv6 is disabled. |
| 400 | InvalidAttachment.NotFound | The attachment is not found. | The specified transit router does not exist. |
| 400 | OperationDenied.LocalRouteEntryInSystemRouteTable | The Local Route Entry In System Route Table Can Not Be Modify. | Modifying the Local route in the system routing table is prohibited. |
| 400 | OperationDenied.LocalRouteEntryBoundToVSwitch | The VSwitch to which the local route you modified belongs is bound to the current routing table. You are not allowed to modify its next hop. | The VSwitch to which the local route you modified belongs is bound to the current routing table. You are not allowed to modify its next hop. |
| 400 | OperationFailed.ModifyEcmpRoute | Operation is failed because ecmp route can not modify. | |
| 400 | InvalidRouteEntry.NotFound | vpc route entry not exist. | the vpc routing table entry does not exist |
| 400 | OperationDenied.IllegalRouteTargetGroupMemberType | This operation does not support route target groups with NAT gateway members. | The current operation does not support routing target groups with members of the NAT gateway type. |
| 400 | OperationUnsupported.Ipv6EntryOnPrimaryNetworkInterface | You cannot create IPv6 route entries on a primary network interface. | You cannot create an IPv6 route whose next hop is a primary ENI. |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.