All Products
Search
Document Center

Microservices Engine:GetGatewayConfig

Last Updated:Dec 05, 2025

Retrieves the parameter configurations of a gateway.

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:GetGatewayConfig

get

*Gateway

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

None None

Request parameters

Parameter

Type

Required

Description

Example

GatewayUniqueId

string

Yes

The unique ID of the gateway.

gw-61f465fa2dd044069e2208c4912*****

AcceptLanguage

string

No

The language in which the returned results are displayed. Valid values: zh (default): Chinese. en: English

zh

Response elements

Parameter

Type

Description

Example

object

RestResult

RequestId

string

The request ID.

F6092602-C357-4750-89D9-E572FBEA****

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Code

integer

The status code. If the request was successful, a value of 200 is returned.

200

ErrorCode

string

The error code.

Success

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The response message.

OK

DynamicCode

string

This parameter is unavailable for use. Ignore this parameter.

code

DynamicMessage

string

This parameter is unavailable for use. Ignore this parameter.

The specified parameter is invalid.

Data

object

The data returned.

GatewayUniqueId

string

The unique ID of the gateway.

gw-61f465fa2dd044069e2208c4912*****

EnableGenerateRequestId

boolean

Indicates whether request IDs are generated in request headers. Request IDs are used to trace requests. This parameter is used to determine the range of requests.

true

EnableGzip

boolean

Indicates whether GZIP compression is enabled. If GZIP compression is enabled, requests and responses are compressed. This reduces gateway traffic but increases the CPU load of the gateway. This parameter applies to requests and responses.

false

EnableSlashMerge

boolean

Indicates whether multiple forward slashes (/) in requests are combined into one forward slash (/). This parameter applies to requests. For example, if this parameter is set to true, www.a.com//b is changed to www.a.com/b based on the combination of forward slashes (/).

true

DownstreamIdleTime

integer

The timeout period of the connection from the client to the gateway. If no requests are available in the specified period of time, the gateway connection is closed. This parameter applies to gateway connections.

180

PreserveHeaderFormat

boolean

Indicates whether all letters of a header are converted into lowercase letters. For requests and responses, HTTP/1.1 headers are not case-sensitive. By default, all letters of HTTP/1.1 headers are converted into lowercase letters to ensure the compatibility with HTTP/2 standards.

true

DownstreamConnectionBufferLimits

integer

The maximum buffer size of a gateway connection. Unit: bytes. This parameter has an impact on the throughput and the use of gateway memory. This parameter applies to gateway connections.

32768

EnableHardwareAccelerate

boolean

Indicates whether hardware acceleration is enabled. If hardware acceleration is not supported in the region where your cloud-native gateway resides or hardware acceleration is not enabled when you purchase your cloud-native gateway, this parameter does not take effect.

true

XffTrustedNum

integer

The number of trusted proxies of the gateway. This parameter applies to requests and determines whether the gateway uses the request headers generated by the client. The request headers include x-forwarded-for and x-request-id.

0

EnableHttp2

boolean

Indicates whether HTTP/2 connections are used between the server and the client. This parameter applies to requests. The new configuration takes effect 1 to 2 minutes after you modify the configuration.

false

DownstreamHttp2MaxConcurrentStream

integer

The maximum number of concurrent streams on an HTTP/2 connection. This parameter applies to requests.

100

InitialStreamWindowSize

integer

The initial window size of a stream on an HTTP/2 connection between the gateway and the client. Unit: bytes. This parameter applies to requests.

65535

InitialConnectionWindowSize

integer

The initial window size of an HTTP/2 connection between the gateway and the client. Unit: bytes. This parameter applies to requests.

1048576

XtraceDetails

object

The information about tracing analysis.

TraceOn

boolean

Indicates whether tracing analysis is enabled.

true

Id

integer

The trace ID.

255

Sample

integer

The sampling rate of tracing analysis. Unit: percentage (%).

100

GatewayId

integer

The gateway ID.

500

GatewayUniqueId

string

The unique ID of the gateway.

gw-61f465fa2dd044069e2208c4912*****

GmtCreate

string

The time when the information about tracing analysis was created.

2024-08-12T09:39:07.000+0000

GmtModified

string

The time when the information about tracing analysis was modified.

2024-08-12T09:39:07.000+0000

TraceType

string

The type of tracing analysis. Valid values:

  • XTRACE: Managed Service for OpenTelemetry with the Zipkin protocol is used.

  • SKYWALKING: Self-managed SkyWalking is used.

  • OPENTELEMETRY: Managed Service for OpenTelemetry with the OpenTelemetry protocol is used.

  • OTSKYWALKING: Managed Service for OpenTelemetry with the SkyWalking protocol is used.

OPENTELEMETRY

ServiceId

integer

The ID of the self-managed SkyWalking service.

333

ServicePort

string

The port number of the self-managed SkyWalking service.

8888

SlsConfigDetails

object

The information about log shipping.

LogOn

boolean

Indicates whether log shipping is enabled.

true

Id

integer

This parameter is unavailable for use.

0

ProjectName

string

The name of the project for which log shipping is enabled.

test

LogStoreName

string

The name of the Logstore to which logs are shipped.

  • If the NginxCompatible parameter is set to false, the Logstore name is mse_gw_access_log.

  • If the NginxCompatible parameter is set to true, the Logstore name is nginx-ingress.

mse_gw_access_log

GatewayUniqueId

string

The unique ID of the gateway.

gw-61f465fa2dd044069e2208c4912*****

GatewayId

integer

The gateway ID.

500

GmtCreate

string

This parameter is unavailable for use.

""

GmtModified

string

This parameter is unavailable for use.

""

NginxCompatible

boolean

Indicates whether Microservices Engine (MSE) Ingress gateways are compatible with NGINX Ingress gateways.

false

SupportWaf

boolean

Indicates whether Web Application Firewall (WAF) is supported for gateways.

true

EnableWaf

boolean

Indicates whether WAF is enabled.

true

AccessLogHeader

string

The custom log format.

{"requestMetadata":[],"responseHeaders":[],"requestHeaders":["x-test"],"responseMetadata":[]}

EnableHttp3

boolean

Indicates whether the HTTP/3 protocol is supported.

false

UpstreamIdleTimeout

integer

The default timeout period for a connection between a gateway and an upstream system. If the idle period of the connection to an upstream system exceeds the value of this parameter, the connection is closed.

30

ZipAlgorithm

string

The compression algorithm. Valid values: brotli and gzip. If you specify this parameter and you do not set EnableGzip to true, the value of EnableGzip is automatically changed to true.

["gzip"]

PathWithEscapedSlashes

string

The forwarding policy of the request whose Uniform Resource Identifier (URI) contains escaped characters, such as %2F, %2f, %5C, or %5c. Default value: KEEP_UNCHANGED. We recommend that you use the default value.

Valid values:

  • KEEP_UNCHANGED

  • REJECT_REQUEST

  • UNESCAPE_AND_REDIRECT

  • UNESCAPE_AND_FORWARD

KEEP_UNCHANGED

NoSupportedConfigList

string

The configurations that are not supported.

"EnableProxyProtocol,EnableCustomAuthConfigPush"

LogFilterConfig

string

This parameter is unavailable for use.

""

EnableProxyProtocol

boolean

Indicates whether the proxy protocol is enabled. If a Network Load Balancer (NLB) instance is used as a traffic ingress, the real IP address of the client cannot be obtained if you do not enable the proxy protocol. After you enable the proxy protocol, requests that do not comply with the proxy protocol remain unaffected.

true

EnableCustomAuthConfigPush

string

Indicates whether the connection is closed if custom authentication rules change. The value true indicates that the connection is not closed. This parameter is suitable for scenarios in which custom authentication services are available and WebSocket and online business are used.

false

KeepaliveHeaderTimeout

integer

The connection timeout period contained in the keep-alive response header that is returned to the client. For example, if you set this parameter to 10, the response header keep-alive: timeout=10 is returned. If you set this parameter to 0, the response header is not returned.

0

WebsocketTermGracePeriod

integer

The keep-alive time that is maintained for the WebSocket connection in scenarios where the connection needs to be closed, such as gateway upgrade or restart. Unit: seconds.

30

EnableK8sSourceWorkloadFilter

object

Enable

boolean

LabelKey

string

LabelValue

string

FilterOpt

string

EnableXffTrustedCidrs

object

Enable

boolean

IpListContent

string

EnableGzipHardwareAccelerate

boolean

Examples

Success response

JSON format

{
  "RequestId": "F6092602-C357-4750-89D9-E572FBEA****",
  "Success": true,
  "Code": 200,
  "ErrorCode": "Success",
  "HttpStatusCode": 200,
  "Message": "OK",
  "DynamicCode": "code",
  "DynamicMessage": "The specified parameter is invalid.",
  "Data": {
    "GatewayUniqueId": "gw-61f465fa2dd044069e2208c4912*****",
    "EnableGenerateRequestId": true,
    "EnableGzip": false,
    "EnableSlashMerge": true,
    "DownstreamIdleTime": 180,
    "PreserveHeaderFormat": true,
    "DownstreamConnectionBufferLimits": 32768,
    "EnableHardwareAccelerate": true,
    "XffTrustedNum": 0,
    "EnableHttp2": false,
    "DownstreamHttp2MaxConcurrentStream": 100,
    "InitialStreamWindowSize": 65535,
    "InitialConnectionWindowSize": 1048576,
    "XtraceDetails": {
      "TraceOn": true,
      "Id": 255,
      "Sample": 100,
      "GatewayId": 500,
      "GatewayUniqueId": "gw-61f465fa2dd044069e2208c4912*****",
      "GmtCreate": "2024-08-12T09:39:07.000+0000",
      "GmtModified": "2024-08-12T09:39:07.000+0000",
      "TraceType": "OPENTELEMETRY",
      "ServiceId": 333,
      "ServicePort": "8888"
    },
    "SlsConfigDetails": {
      "LogOn": true,
      "Id": 0,
      "ProjectName": "test",
      "LogStoreName": "mse_gw_access_log",
      "GatewayUniqueId": "gw-61f465fa2dd044069e2208c4912*****\n",
      "GatewayId": 500,
      "GmtCreate": "\"\"",
      "GmtModified": " \"\"",
      "NginxCompatible": false
    },
    "SupportWaf": true,
    "EnableWaf": true,
    "AccessLogHeader": "{\"requestMetadata\":[],\"responseHeaders\":[],\"requestHeaders\":[\"x-test\"],\"responseMetadata\":[]}",
    "EnableHttp3": false,
    "UpstreamIdleTimeout": 30,
    "ZipAlgorithm": "[\"gzip\"]",
    "PathWithEscapedSlashes": "KEEP_UNCHANGED",
    "NoSupportedConfigList": "\"EnableProxyProtocol,EnableCustomAuthConfigPush\"",
    "LogFilterConfig": " \"\"",
    "EnableProxyProtocol": true,
    "EnableCustomAuthConfigPush": "false",
    "KeepaliveHeaderTimeout": 0,
    "WebsocketTermGracePeriod": 30,
    "EnableK8sSourceWorkloadFilter": {
      "Enable": true,
      "LabelKey": "",
      "LabelValue": "",
      "FilterOpt": ""
    },
    "EnableXffTrustedCidrs": {
      "Enable": true,
      "IpListContent": ""
    },
    "EnableGzipHardwareAccelerate": true
  }
}

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.