全部產品
Search
文件中心

Microservices Engine:UpdateGatewayRoute - 更新網關路由

更新時間:Jun 01, 2026

更新網關路由。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

mse:UpdateGatewayRoute

update

*Gateway

acs:mse:{#regionId}:{#accountId}:instance/{#GatewayUniqueId}

請求參數

名稱

類型

必填

描述

樣本值

GatewayId

integer

網關 ID。

501

Name deprecated

string

路由名稱。

route-web

RouteOrder

integer

路由順序。

1

Predicates

array

路由匹配條件。

PathPredicates

object

Path 匹配。

Path

string

路由 Path 路徑。

/test

Type

string

匹配類型。

PRE

IgnoreCase

boolean

忽略大小寫。

true

MethodPredicates

array

方法匹配。

string

具體方法。

GET

HeaderPredicates

array

要求標頭匹配。

object

要求標頭。

Key

string

要求標頭 Key。

debug

Value

string

對應的 Value。

on

Type

string

匹配類型。

PRE

QueryPredicates

array

參數匹配。

object

URL 參數。

Key

string

參數名。

userid

Value

string

匹配值。

test

Type

string

匹配類型。

PRE

Services

array

目標服務(路由指向為單服務、多服務、標籤路由時填寫)。

array

服務列表。

ServiceId

integer

服務 ID。

1

Percent

integer

當前服務/服務版本分流百分比(只在使用多服務、標籤路由時填寫)。

80

Version

string

服務版本(只在使用標籤路由時填寫)。

v1

Name

string

名稱。

web

SourceType

string

來源類型。

MSE

Namespace

string

服務所在命名空間。

default

GroupName

string

服務分組名稱。

test

AgreementType

string

協議類型。

DUBBO

HttpDubboTranscoder

object

Dubbo 協議轉換體。

DubboServiceName

string

Dubbo 服務名稱。

org.apache.dubbo.samples.basic.api.DemoService

DubboServiceVersion

string

Dubbot 服務版本。

0.0.0

DubboServiceGroup

string

Dubbo 服務組。

service name

MothedMapList

array

Dubbo 轉寄規則列表。

array

方法映射體。

DubboMothedName

string

Dubbo 方法名。

sayHello

HttpMothed

string

Http 方法。

說明

支援 http 方法參數值。

  • ALL_GET。

  • ALL_POST。

  • ALL_PUT。

  • ALL_DELETE。

  • ALL_PATCH。

ALL_GET

Mothedpath

string

方法匹配路徑。

/mytestzbk/sayhello

PassThroughAllHeaders

string

Header 透傳類型。

說明

透傳類型枚舉值。

  • 透傳所有:PASS_ALL。

  • 不透傳:PASS_NOT。

  • 指定參數:PASS_ASSIGN。

PASS_NOT

PassThroughList

array

指定透傳 Header 列表。

string

指定 Header 透傳值。

x-forward

ParamMapsList

array

參數映射列表。

object

參數映射體。

ExtractKeySpec

string

入參位置。

說明

入參位置枚舉值。

  • 請求參數:ALL_QUERY_PARAMETER

  • 要求標頭:ALL_HEADER

  • 請求路徑:ALL_PATH

  • 請求體:ALL_BODY

ALL_QUERY_PARAMETER

ExtractKey

string

入參位提取 Key。

name

MappingType

string

後端參數類型。

java.lang.String

ServicePort

integer

Dubbo 連接埠。

20880

Id

integer

路由 ID。

139

DestinationType

string

目標服務類型。

Mock

DirectResponseJSON

object

Mock 內容。

Code

integer

Mock 返回碼。

200

Body

string

Mock 傳回值。

hello

GatewayUniqueId

string

網關唯一標識 ID。

gw-86575c0bc9f04ecfbacb92b8e392a2c4

DomainIdListJSON

string

關聯網域名稱。

[90]

RedirectJSON

object

重新導向。

Code

integer

狀態代碼。

302

Host

string

重新導向主機名稱。

test.com

Path

string

重新導向路徑。

/test

EnableWaf deprecated

boolean

已廢棄,請使用 UpdateGatewayRouteWafStatus 更新路由 WAF 狀態。

false

Fallback

boolean

是否開啟 Fallback 服務。

true

FallbackServices

array

Fallback 服務。

object

資料對象。

ServiceId

integer

服務 ID。

1

Percent

integer

權重百分比。

80

Version

string

服務版本。

v1

Name

string

名稱。

name

SourceType

string

來源類型。

MSE

Namespace

string

服務所在命名空間。

Namespace

GroupName

string

服務分組名稱。

test

AgreementType

string

協議類型。

DUBBO

ServicePort

integer

服務連接埠。

8848

Description

string

路由描述

a route for xxx

AcceptLanguage

string

返回資訊的語言類型:

  • zh:中文

  • en:英文

zh

返回參數

名稱

類型

描述

樣本值

object

資料結構

RequestId

string

請求 ID

73785414-2C5B-5E28-BD91-B2C742269C48

HttpStatusCode

integer

HTTP 返回碼。

200

Message

string

響應描述

請求處理成功

Code

integer

狀態代碼

200

Success

boolean

請求結果,取值如下:

  • true:請求成功。

  • false:請求失敗。

true

Data

integer

資料。

337

ErrorCode

string

錯誤碼。

NoPermission

樣本

正常返回樣本

JSON格式

{
  "RequestId": "73785414-2C5B-5E28-BD91-B2C742269C48",
  "HttpStatusCode": 200,
  "Message": "請求處理成功",
  "Code": 200,
  "Success": true,
  "Data": 337,
  "ErrorCode": "NoPermission"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 IllegalRequest Invalid request:%s 非法請求: %s
400 InvalidParameter Parameter error:%s 請求參數錯誤:%s
500 InternalError Console error. Try again later:%s 控制台錯誤.稍後重試:%s
403 NoPermission You are not authorized to perform this operation:%s 沒有許可權使用此介面:%s
404 NotFound Not found:%s 資源不存在:%s

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情