All Products
Search
Document Center

Virtual Private Cloud:ModifyRouteEntry

Last Updated:Mar 22, 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:ModifyRouteEntryWrite
  • 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****

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.
400MissingParam.RouteEntryId%s-
400IllegalParam.RouteEntryName%s-
400InvalidRouteEntryId.NotFound%s-
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.
403ForbbidenUser not authorized to operate on the specified resource.User not authorized to operate on the specified resource.

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

Change history

Change timeSummary of changesOperation
2023-12-25The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    Added Error Codes: 404
2023-09-15The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
2023-09-15API Description Update. The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: NewNextHopType
    Added Input Parameters: NewNextHopId
2023-05-08The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403