全部產品
Search
文件中心

API Gateway:UpdateHttpApiRoute - 更新路由

更新時間:Mar 30, 2026

更新HttpApi的路由。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

apig:UpdateHttpApiRoute

none

*HttpApi

acs:apig:{#regionId}:{#accountId}:httpapi/{#HttpApiId}

請求文法

PUT /v1/http-apis/{httpApiId}/routes/{routeId} HTTP/1.1

路徑參數

名稱

類型

必填

描述

樣本值

httpApiId

string

路由所屬的 HTTP API ID。

api-cqoub6tlhtgvof7***

routeId

string

路由 ID。

hr-cr82undlhtgrl***

請求參數

名稱

類型

必填

描述

樣本值

body

object

請求 Body。

domainIds

array

網域名稱 ID 列表。

string

網域名稱 ID。

d-cr62ts5lhtgln***

match HttpRouteMatch

路由 Match 規則。

backendConfig

object

路由的後端服務配置。

scene

string

後端服務情境。

枚舉值:

  • SingleService :

    單服務

  • MultiServiceByRatio :

    多服務按比例灰階

  • Redirect :

    Redirect

  • Mock :

    Mock

SingleService

services

array<object>

後端服務列表。

object

後端服務。

serviceId

string

服務 ID。

svc-cr6pk4tlhtgm58e***

protocol

string

服務合約:

  • HTTP。

  • HTTPS。

枚舉值:

  • HTTPS :

    HTTPS

  • HTTP :

    HTTP

HTTP

version

string

服務版本。

v1

weight

integer

流量比例的百分比值。

49

port

integer

服務連接埠, 動態連接埠不傳入。

8080

environmentId

string

環境 ID。

env-cquqsollhtgid***

description

string

路由描述。

商品中心服務路由

deployConfigs

array

HttpApiDeployConfig

name

string

mcpRouteConfig

object

protocol

string

exposedUriPath

string

mcpStatisticsEnable

boolean

policyConfigs

array<object>

array<object>

type

string

enable

boolean

aiFallbackConfig

object

serviceConfigs

array<object>

object

serviceId

string

name

string

targetModelName

string

passThroughModelName

boolean

onlyRedirectUpstreamCode

boolean

routeEmbedded

boolean

aiSecurityGuardConfig

object

serviceAddress

string

checkRequest

boolean

checkResponse

boolean

checkRequestImage

boolean

checkResponseImage

boolean

requestCheckService

string

responseCheckService

string

requestImageCheckService

string

responseImageCheckService

string

riskAlertLevel

string

riskConfig

array<object>

array<object>

type

string

level

string

consumerRules

object

pattern

string

迴圈規則。

matchType

string

bufferLimit

integer

pluginStatus

object

errorLogs

object

string

serviceHealthy

boolean

pluginId

string

consumerRequestCheckService

array<object>

object

name

string

requestCheckService

string

requestImageCheckService

string

matchType

string

modalityType

string

consumerResponseCheckService

array<object>

object

name

string

responseCheckService

string

responseImageCheckService

string

matchType

string

modalityType

string

consumerRiskLevel

array<object>

object

name

string

matchType

string

type

string

level

string

aiTokenRateLimitConfig

object

rules

array<object>

object

limitType

string

matchKey

string

matchType

string

matchValue

string

limitMode

string

limitValue

integer

enableGlobalRules

boolean

globalRules

array<object>

object

limitType

string

matchKey

string

matchType

string

matchValue

string

limitMode

string

limitValue

integer

redisConfig

object

host

string

port

integer

username

string

password

string

timeout

integer

databaseNumber

integer

pluginStatus

object

errorLogs

object

string

serviceHealthy

boolean

pluginId

string

aiCacheConfig

object

cacheTTL

integer

redisConfig

object

host

string

port

integer

username

string

password

string

timeout

integer

databaseNumber

integer

vectorConfig

object

type

string

serviceHost

string

apiKey

string

apiKey

timeout

integer

6000

collectionId

string

threshold

number

embeddingConfig

object

type

string

serviceId

string

timeout

integer

modelName

string

cacheKeyStrategy

string

cacheMode

string

pluginStatus

object

errorLogs

object

string

serviceHealthy

boolean

pluginId

string

aiNetworkSearchConfig

object

needReference

boolean

referenceFormat

string

referenceLocation

string

defaultLang

string

defaultEnable

boolean

searchFrom

array<object>

array<object>

type

string

apiKey

string

count

integer

start

integer

timeoutMillisecond

integer

optionArgs

object

string

endpoint

string

contentMode

string

industry

string

timeRange

string

searchEngineConfig

object

搜尋引擎配置

type

string

apiKey

string

count

integer

start

integer

timeoutMillisecond

integer

optionArgs

object

string

endpoint

string

contentMode

string

industry

string

timeRange

string

searchRewrite

object

enable

boolean

serviceId

string

modelName

string

timeoutMillisecond

integer

maxCount

integer

pluginStatus

object

errorLogs

object

string

serviceHealthy

boolean

pluginId

string

aiToolSelectionConfig

object

enableConditions

object

toolCountThreshold

integer

toolReranking

object

modelService

object

serviceId

string

modelName

string

timeoutMillisecond

integer

filteringMethod

string

topKPercent

integer

topNCount

integer

scoreThreshold

number

fallbackStrategy

string

queryRewriting

object

enabled

boolean

modelService

object

serviceId

string

modelName

string

timeoutMillisecond

integer

promptConfig

object

type

string

customPrompt

string

maxOutputTokens

integer

triggerConditions

object

messageCountThreshold

integer

contextSelection

object

type

string

value

integer

fallbackStrategy

string

pluginStatus

object

errorLogs

object

string

serviceHealthy

boolean

pluginId

string

aiStatisticsConfig

object

logRequestContent

boolean

logResponseContent

boolean

semanticRouterConfig

object

timeoutMillisecond

integer

返回參數

名稱

類型

描述

樣本值

object

結構體

requestId

string

請求 ID。

CBEEB8C1-108E-50F0-9BEA-DED79553C309

code

string

響應狀態代碼。

Ok

message

string

響應訊息。

success

樣本

正常返回樣本

JSON格式

{
  "requestId": "CBEEB8C1-108E-50F0-9BEA-DED79553C309",
  "code": "Ok",
  "message": "success"
}

錯誤碼

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

變更歷史

更多資訊,參考變更詳情