Modifies the next hop type and next hop of a gateway route table.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:UpdateGatewayRouteTableEntryAttribute |
update |
*RouteTable
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the gateway route table that you want to modify. You can call the DescribeRegions operation to query the region ID. |
ap-southeast-6 |
| IPv4GatewayRouteTableId |
string |
No |
The ID of the gateway route table that you want to modify. |
vtb-5ts0ohchwkp3dydt2**** |
| GatewayRouteTableId |
string |
No |
The ID of the gateway route table that you want to modify. |
vtb-5ts0ohchwkp3dydt2**** |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The ClientToken value can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId as the ClientToken. The RequestId of each API request is different. |
123e4567-e89b-12d3-a456-426655440000 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| DestinationCidrBlock |
string |
Yes |
The destination CIDR block of the route entry in the gateway route table. |
47.100.XX.XX/16 |
| NextHopType |
string |
Yes |
The next hop type of the route that you want to modify. Valid values:
|
Instance |
| NextHopId |
string |
No |
The instance ID of the next hop that you want to modify.
Note
If the next hop type of the route is Instance or NetworkInterface and you want to modify the next hop, you must first change NextHopType to Local, and then change NextHopType to Instance or NetworkInterface and specify the NextHopId. You cannot directly change the next hop from one ENI or ECS instance to another ENI or ECS instance. |
i-bp18xq9yguxoxe7m**** |
| Name |
string |
No |
The name of the gateway route table. The name must be 2 to 128 characters in length and must start with a letter or Chinese character. It can contain digits, periods (.), underscores (_), and hyphens (-). |
test |
| Description |
string |
No |
The description of the gateway route table. The description must be 2 to 256 characters in length and must start with a letter or Chinese character. It cannot start with |
new |
| RegionId |
string |
Yes |
要修改的网关路由表所在地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
ap-southeast-6 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
Examples
Success response
JSON format
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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 | IllegalParam.DestCidrBlock | The destCidrBlock is invalid. | The specified destination address is invalid. |
| 400 | ResourceNotFound.NetworkInterface | The specified resource nextHop is not found. | The next hop instance does not exist. |
| 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 | ResourceNotFound.RouteTable | The specified resource gatewayRouteTable is not found. | The gateway route table does not exist. |
| 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 | UnsupportedRegion | The feature is not supported in current region. | The feature is not supported in the current region. |
| 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 | BothEmptyParam.GatewayRouteTableIdAndIpv4GatewayRouteTableId | The parameter GatewayRouteTableId and Ipv4GatewayRouteTableId cannot be empty at the same time. We recommend that you use GatewayRouteTableId. | The parameter GatewayRouteTableId and Ipv4GatewayRouteTableId cannot be empty at the same time. We recommend that you use GatewayRouteTableId. |
| 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. |
| 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.