All Products
Search
Document Center

Microservices Engine:UpdateGatewayRoute

Last Updated:Jun 10, 2026

Memperbarui aturan routing untuk gerbang.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

mse:UpdateGatewayRoute

update

*Gateway

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

GatewayId

integer

No

ID gerbang.

501

Name deprecated

string

No

Nama entri rute.

route-web

RouteOrder

integer

No

Nomor urut entri rute.

1

Predicates

object

Yes

Kondisi pencocokan entri rute.

PathPredicates

object

Yes

The path matching.

Path

string

No

The route path.

/test

Type

string

No

The matching type.

PRE

IgnoreCase

boolean

No

Specifies whether to ignore case sensitivity.

true

MethodPredicates

array

No

The information about method matching.

string

No

The method.

GET

HeaderPredicates

array<object>

No

The information about header matching.

object

No

The request header.

Key

string

No

The request header key.

debug

Value

string

No

The corresponding value.

on

Type

string

No

The matching type.

PRE

QueryPredicates

array<object>

No

The information about parameter matching.

object

No

The URL parameter.

Key

string

No

The parameter name.

userid

Value

string

No

The value.

test

Type

string

No

The match type.

PRE

Services

array<object>

No

Layanan yang ingin Anda kaitkan dengan gerbang. Parameter ini wajib jika parameter Route Point diatur ke Single Service, Multiple Services, atau Label routing.

array<object>

No

The list of services.

ServiceId

integer

No

The service ID.

1

Percent

integer

No

The traffic weight of the service of a specific version, in percentage. This parameter is required if the Route Point parameter is set to Multiple Services or Label routing.

80

Version

string

No

The service version. This parameter is required only if the Route Point parameter is set to Label routing.

v1

Name

string

No

The name.

web

SourceType

string

No

The type of the source.

MSE

Namespace

string

No

The namespace to which the service belongs.

default

GroupName

string

No

The name of the group to which the service belongs.

test

AgreementType

string

No

The Protocol Type.

DUBBO

HttpDubboTranscoder

object

No

The Dubbo protocol converter.

DubboServiceName

string

No

The Dubbo service name.

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

DubboServiceVersion

string

No

The Dubbo service version.

0.0.0

DubboServiceGroup

string

No

The Dubbo service group.

service name

MothedMapList

array<object>

No

The Dubbo forwarding rules.

array<object>

No

The method mapping object.

DubboMothedName

string

No

The Dubbo method name.

sayHello

HttpMothed

string

No

The HTTP method.

Catatan

Supported HTTP method parameter values.

  • ALL_GET.

  • ALL_POST.

  • ALL_PUT.

  • ALL_DELETE.

  • ALL_PATCH.

ALL_GET

Mothedpath

string

No

The path that is used to match a method.

/mytestzbk/sayhello

PassThroughAllHeaders

string

No

The pass-through type of the header.

Catatan

Enumeration values for pass-through types.

  • PASS_ALL: All headers are passed through.

  • PASS_NOT: All headers are not passed through.

  • PASS_ASSIGN: Specified headers are passed through.

PASS_NOT

PassThroughList

array

No

The headers that are passed through.

string

No

The header value that is passed through.

x-forward

ParamMapsList

array<object>

No

The information about parameter mappings.

object

No

The parameter mapping object.

ExtractKeySpec

string

No

The input parameter position.

Catatan

Enumeration values for input parameter positions.

  • Request parameter: ALL_QUERY_PARAMETER

  • Request header: ALL_HEADER

  • URI of the request: ALL_PATH

  • Request body: ALL_BODY

ALL_QUERY_PARAMETER

ExtractKey

string

No

The key of the input parameter that is extracted.

name

MappingType

string

No

The type of the backend service parameter.

java.lang.String

ServicePort

integer

No

The Dubbo port number.

20880

Id

integer

No

ID entri rute.

139

DestinationType

string

No

Tipe layanan tujuan.

Mock

DirectResponseJSON

object

No

Konten Mock.

Code

integer

No

The Mock return code.

200

Body

string

No

The return value.

hello

GatewayUniqueId

string

Yes

ID unik gerbang.

gw-86575c0bc9f04ecfbacb92b8e392a2c4

DomainIdListJSON

string

Yes

Nama domain terkait.

[90]

RedirectJSON

object

No

Pengalihan.

Code

integer

No

The status code.

302

Host

string

No

The hostname to be redirected to.

test.com

Path

string

No

The path to be redirected to.

/test

EnableWaf deprecated

boolean

No

Tidak digunakan lagi. Gunakan UpdateGatewayRouteWafStatus untuk memperbarui status WAF entri rute.

false

Fallback

boolean

No

Apakah akan mengaktifkan layanan Fallback.

true

FallbackServices

array<object>

No

Layanan Fallback.

object

No

The data object.

ServiceId

integer

No

The service ID.

1

Percent

integer

No

The weight in the form of a percentage value.

80

Version

string

No

The version of the service.

v1

Name

string

No

The name.

name

SourceType

string

No

The type of the source.

MSE

Namespace

string

No

The namespace in which the service resides.

Namespace

GroupName

string

No

The name of the group to which the service belongs.

test

AgreementType

string

No

The Protocol Type.

DUBBO

ServicePort

integer

No

The service port number.

8848

Description

string

No

Deskripsi entri rute.

a route for xxx

AcceptLanguage

string

No

Bahasa tanggapan. Nilai valid:

  • zh: Bahasa Mandarin

  • en: Bahasa Inggris.

zh

Elemen respons

Element

Type

Description

Example

object

Data structure

RequestId

string

The request ID

73785414-2C5B-5E28-BD91-B2C742269C48

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The message returned.

请求处理成功

Code

integer

The status code

200

Success

boolean

Indicates whether the call was successful. Valid values:

  • true: The call was successful.

  • false: The call failed.

true

Data

integer

The data.

337

ErrorCode

string

The error code.

NoPermission

Contoh

Respons sukses

JSONformat

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

Kode kesalahan

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

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.