UpdateHttpApiRoute - 更新路由

更新时间:
复制为 MD 格式

更新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

路由描述。

商品中心服务路由

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"
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情