All Products
Search
Document Center

Microservices Engine:UpdateGatewayRoute

Last Updated:Oct 26, 2026

Updates a gateway route.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mse:UpdateGatewayRoute

update

*Gateway

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

None None

Request parameters

Parameter

Type

Required

Description

Example

GatewayId

integer

No

The ID of the gateway.

501

Name deprecated

string

No

The name of the route.

route-web

RouteOrder

integer

No

The order of the route.

1

Predicates

object

Yes

The matching conditions of the route.

PathPredicates

object

Yes

The path matching conditions.

Path

string

No

The path of the route.

/test

Type

string

No

The matching type.

PRE

IgnoreCase

boolean

No

Specifies whether to ignore case.

true

MethodPredicates

array

No

The method matching conditions.

string

No

The specific method.

GET

HeaderPredicates

array<object>

No

The request header matching conditions.

object

No

The request header.

Key

string

No

The key of the request header.

debug

Value

string

No

The value of the request header.

on

Type

string

No

The matching type.

PRE

QueryPredicates

array<object>

No

The query parameter matching conditions.

object

No

The URL parameter.

Key

string

No

The name of the parameter.

userid

Value

string

No

The matching value.

test

Type

string

No

The matching type.

PRE

Services

array<object>

No

The destination services. Specify this parameter when the route points to a single service, multiple services, or tag-based routing.

array<object>

No

The list of services.

ServiceId

integer

No

The ID of the service.

1

Percent

integer

No

The traffic distribution percentage of the current service or service version. Specify this parameter only when multiple services or tag-based routing is used.

80

Version

string

No

The service version. Specify this parameter only when tag-based routing is used.

v1

Name

string

No

The name.

web

SourceType

string

No

The source type.

MSE

Namespace

string

No

The namespace where the service resides.

default

GroupName

string

No

The name of the service group.

test

AgreementType

string

No

The protocol type.

DUBBO

HttpDubboTranscoder

object

No

The Dubbo protocol transcoding configuration.

DubboServiceName

string

No

The Dubbo service name.

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

DubboServiceVersion

string

No

The version of the Dubbo service.

0.0.0

DubboServiceGroup

string

No

The Dubbo service group.

service name

MothedMapList

array<object>

No

The list of Dubbo forwarding rules.

array<object>

No

The method mapping configuration.

DubboMothedName

string

No

The name of the Dubbo method.

sayHello

HttpMothed

string

No

The HTTP method.

Note

Supported HTTP method parameter values:

  • ALL_GET

  • ALL_POST

  • ALL_PUT

  • ALL_DELETE

  • ALL_PATCH

ALL_GET

Mothedpath

string

No

The matching path of the method.

/mytestzbk/sayhello

PassThroughAllHeaders

string

No

The header pass-through type.

Note

Valid values for the pass-through type:

  • PASS_ALL: Passes through all headers.

  • PASS_NOT: Does not pass through any headers.

  • PASS_ASSIGN: Passes through specified headers.

PASS_NOT

PassThroughList

array

No

The list of specified headers to pass through.

string

No

The specified header to pass through.

x-forward

ParamMapsList

array<object>

No

The list of parameter mappings.

object

No

The parameter mapping configuration.

ExtractKeySpec

string

No

The position of the input parameter.

Note

Valid values for the position of the input parameter:

  • Request parameter: ALL_QUERY_PARAMETER

  • Request header: ALL_HEADER

  • Request path: ALL_PATH

  • Request body: ALL_BODY

ALL_QUERY_PARAMETER

ExtractKey

string

No

The key extracted from the input parameter position.

name

MappingType

string

No

The backend parameter type.

java.lang.String

ServicePort

integer

No

The Dubbo port.

20880

Id

integer

No

The ID of the route.

139

DestinationType

string

No

The type of the destination service.

Mock

DirectResponseJSON

object

No

The mock content.

Code

integer

No

The mock response code.

200

Body

string

No

The mock response body.

hello

GatewayUniqueId

string

Yes

The unique ID of the gateway.

gw-86575c0bc9f04ecfbacb92b8e392a2c4

DomainIdListJSON

string

Yes

The associated domain names.

[90]

RedirectJSON

object

No

The redirect configuration.

Code

integer

No

The status code.

302

Host

string

No

The redirect hostname.

test.com

Path

string

No

The redirect path.

/test

EnableWaf deprecated

boolean

No

[Deprecated] Use UpdateGatewayRouteWafStatus to update the WAF status of the route.

false

Fallback

boolean

No

Specifies whether to enable the fallback service.

true

FallbackServices

array<object>

No

The fallback services.

object

No

The data object.

ServiceId

integer

No

The ID of the service.

1

Percent

integer

No

The weight percentage.

80

Version

string

No

The service version.

v1

Name

string

No

The name.

name

SourceType

string

No

The source type.

MSE

Namespace

string

No

The namespace where the service resides.

Namespace

GroupName

string

No

The name of the service group.

test

AgreementType

string

No

The protocol type.

DUBBO

ServicePort

integer

No

The service port.

8848

Description

string

No

The description of the route.

a route for xxx

AcceptLanguage

string

No

The language of the returned information. Valid values:

  • zh: Chinese

  • en: English

zh

Response elements

Element

Type

Description

Example

object

The data structure.

RequestId

string

The request ID.

73785414-2C5B-5E28-BD91-B2C742269C48

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The response description.

The request is processed successfully.

Code

integer

The status code.

200

Success

boolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request failed.

true

Data

integer

The data.

337

ErrorCode

string

The error code.

NoPermission

Examples

Success response

JSON format

{
  "RequestId": "73785414-2C5B-5E28-BD91-B2C742269C48",
  "HttpStatusCode": 200,
  "Message": "The request is processed successfully.",
  "Code": 200,
  "Success": true,
  "Data": 337,
  "ErrorCode": "NoPermission"
}

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalRequest Invalid request:%s Invalid request: %s
400 InvalidParameter Parameter error:%s Request parameter error: %s
500 InternalError Console error. Try again later:%s Console error. Try again later: %s
403 NoPermission You are not authorized to perform this operation:%s You do not have the permission to use this interface:%s
404 NotFound Not found:%s The resource does not exist:%s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.