修改閘道路由表的下一跳類型和下一跳。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:UpdateGatewayRouteTableEntryAttribute |
update |
*RouteTable
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
要修改的閘道路由表所在地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
ap-southeast-6 |
| IPv4GatewayRouteTableId |
string |
否 |
要修改的閘道路由表 ID。 |
vtb-5ts0ohchwkp3dydt2**** |
| GatewayRouteTableId |
string |
否 |
要修改的閘道路由表 ID。 |
vtb-5ts0ohchwkp3dydt2**** |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的冪等性。 從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 不一樣。 |
123e4567-e89b-12d3-a456-426655440000 |
| DryRun |
boolean |
否 |
是否只預檢此次請求。取值:
|
false |
| DestinationCidrBlock |
string |
是 |
閘道路由表的路由條目的目標網段。 |
47.100.XX.XX/16 |
| NextHopType |
string |
是 |
要修改的路由條目下一跳類型。取值:
|
Instance |
| NextHopId |
string |
否 |
要修改的下一跳的執行個體 ID。
說明
當路由條目的下一跳類型為 Instance 或 NetworkInterface 時需要修改下一跳,您需要先將 NextHopType 修改為 Local,然後再將 NextHopType 修改為 Instance 或 NetworkInterface 之後修改具體的 NextHopId。當下一跳類型為彈性網卡或 ECS 執行個體時,不支援直接修改下一跳為其他的彈性網卡或 ECS 執行個體。 |
i-bp18xq9yguxoxe7m**** |
| Name |
string |
否 |
閘道路由表的名稱。 長度為 2~128 個字元,必須以字母或中文開頭,可包含數字、半形句號(.)、底線(_)和短橫線(-)。 |
test |
| Description |
string |
否 |
閘道路由表的描述資訊。 長度為 2~256 個字元,必須以字母或中文開頭,但不能以 |
new |
| RegionId |
string |
是 |
要修改的閘道路由表所在地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
ap-southeast-6 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | OperationDenied.UpdateGatewayRouteEntry | The operation is not allowed because of need switch to local first. | |
| 400 | IllegalParam.DestCidrBlock | The destCidrBlock is invalid. | |
| 400 | ResourceNotFound.NetworkInterface | The specified resource nextHop is not found. | |
| 400 | ResourceNotFound.RouteEntry | The specified resource routeEntry is not found. | |
| 400 | IncorrectStatus.RouteEntry | The status of %s [%s] is incorrect. | |
| 400 | IncorrectStatus.Vswitch | The status of %s [%s] is incorrect. | |
| 400 | ResourceNotFound.Instance | The specified resource nextHop is not found. | |
| 400 | IncorrectStatus.NextHop | The status of %s [%s] is incorrect. | |
| 400 | OperationDenied.NextHopTypeNonsupport | The operation is not allowed because of nextHopType is nonsupport. | |
| 400 | OperationDenied.LocalEntryCanOnlyModifyNextHop | Only the nextHop parameter can be modified for a local route entry. | |
| 400 | ExclusiveParam.NextHopTypeAndNextHopId | The param of nextHopType and nextHopId are mutually exclusive. | |
| 400 | ResourceNotFound.RouteTable | The specified resource gatewayRouteTable is not found. | |
| 400 | InvalidRouterInterfaceId.NotFound | The specified RouterInterfaceId does not exist in our record. | |
| 400 | OperationUnsupported.OnlySupportNormalNetworkInterface | Next hop only supports binding normal network Interface. | |
| 400 | UnsupportedRegion | The feature is not supported in current region. | |
| 400 | UnsupportedFeature.Ipv6GatewayRouteTable | The feature of %s is not supported. | |
| 400 | OperationDenied.TrAttachmentIpv6Disabled | The operation is not allowed because tr attachment Ipv6 is disabled. | |
| 400 | InvalidAttachment.NotFound | The attachment is not found. | |
| 400 | BothEmptyParam.GatewayRouteTableIdAndIpv4GatewayRouteTableId | 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. | |
| 404 | ResourceNotFound.GatewayLoadBalancerEndpoint | GatewayLoadBalancerEndpoint instance not found. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。