All Products
Search
Document Center

Microservices Engine:GetGatewayConfig

Last Updated:Jul 15, 2026

Retrieves the parameter settings 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 of the returned results. Valid values: zh (default): Chinese, en: English.

zh

Response elements

Element

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 response code that is synchronized with the Success parameter.

200

ErrorCode

string

The error code.

Success

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The response message.

OK

DynamicCode

string

Not in use. Ignore this parameter.

code

DynamicMessage

string

Not in use. Ignore this parameter.

The specified parameter is invalid.

Data

object

The data overview.

GatewayUniqueId

string

The unique ID of the gateway.

gw-61f465fa2dd044069e2208c4912*****

EnableGenerateRequestId

boolean

Applies to the request scope. When enabled, a request ID is generated in the request header for request tracing.

true

EnableGzip

boolean

Applies to the request and response phases. Enabling gzip compresses request and response data, which reduces gateway traffic but increases gateway CPU consumption.

false

EnableSlashMerge

boolean

Applies to the request phase. Specifies whether to merge redundant slashes in requests. When enabled, redundant slashes in www.a.com//b are merged, making it equivalent to www.a.com/b.

true

DownstreamIdleTime

integer

Applies to gateway connections. The connection between the client and the gateway is closed if no request is received within the specified period.

180

PreserveHeaderFormat

boolean

Applies to the request and response phases. Specifies whether to preserve the original case of request headers. In the HTTP/1.1 specification, headers are case-insensitive. For HTTP/2 compatibility, headers are converted to lowercase by default.

true

DownstreamConnectionBufferLimits

integer

Applies to gateway connections. The buffer size per connection. This setting affects throughput and gateway memory usage. Unit: bytes.

32768

EnableHardwareAccelerate

boolean

Specifies whether to enable hardware acceleration. This may fail if your region does not support it at the infrastructure level or if hardware acceleration was not specified at purchase time.

true

XffTrustedNum

integer

Applies to the request phase. The number of trusted proxies in front of the gateway. This affects whether the gateway uses client-generated request headers such as x-forwarded-for and x-request-id.

0

EnableHttp2

boolean

Applies to the request phase. Specifies whether to use HTTP/2 during negotiation between the server and client. Changes take effect within 1 to 2 minutes.

false

DownstreamHttp2MaxConcurrentStream

integer

Applies to the request phase. The maximum number of concurrent streams on a single connection when the client uses HTTP/2.

100

InitialStreamWindowSize

integer

Applies to the request phase. The initial stream window size negotiated between the gateway and the client when using HTTP/2. Unit: bytes.

65535

InitialConnectionWindowSize

integer

Applies to the request phase. The connection-level initial window size negotiated between the gateway and the client when using HTTP/2. Unit: bytes.

1048576

XtraceDetails

object

The Tracing Analysis information.

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 log delivery information.

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 the gateway supports WAF.

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 HTTP/3 is supported.

false

UpstreamIdleTimeout

integer

The default idle timeout for upstream connections.

30

ZipAlgorithm

string

The compression algorithm used when compression is enabled. You can select brotli or gzip. If EnableGzip is not enabled, it is automatically enabled when this parameter is set.

["gzip"]

PathWithEscapedSlashes

string

Specifies the action for requests that contain escaped characters %2F, %2f, %5C, or %5c in the URI path. The default value is KEEP_UNCHANGED.

Valid values:

  • KEEP_UNCHANGED

  • REJECT_REQUEST

  • UNESCAPE_AND_REDIRECT

  • UNESCAPE_AND_FORWARD

KEEP_UNCHANGED

NoSupportedConfigList

string

The list of unsupported configurations.

"EnableProxyProtocol,EnableCustomAuthConfigPush"

LogFilterConfig

string

Not available for use.

""

EnableProxyProtocol

boolean

Specifies whether to enable the Proxy protocol. If the gateway ingress traffic is received through NLB, the originating IP address of the client cannot be obtained without enabling this protocol. Enabling it does not affect non-Proxy protocol requests.

true

EnableCustomAuthConfigPush

string

Applies to scenarios that use a self-managed authentication service. When enabled, changes to authentication rules do not cause connection interruptions. This is suitable for WebSocket and online business scenarios.

false

KeepaliveHeaderTimeout

integer

Specifies the value used to generate the Keep-Alive response header returned to the client, indicating the connection keep-alive time. For example, if set to 10, the response header keep-alive: timeout=10 is returned. If set to 0, this response header is not returned.

0

WebsocketTermGracePeriod

integer

The keep-alive time maintained for WebSocket connections when the gateway instance needs to close connections during upgrades or restarts. Unit: seconds.

30

EnableK8sSourceWorkloadFilter

object

Enable

boolean

LabelKey

string

LabelValue

string

FilterOpt

string

EnableXffTrustedCidrs

object

Enable

boolean

IpListContent

string

EnableGzipHardwareAccelerate

boolean

PreserveExternalRequestID

boolean

LiteMetrics

boolean

LogRequestResponseConfig

string

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": false,
      "LabelKey": "",
      "LabelValue": "",
      "FilterOpt": ""
    },
    "EnableXffTrustedCidrs": {
      "Enable": false,
      "IpListContent": ""
    },
    "EnableGzipHardwareAccelerate": false,
    "PreserveExternalRequestID": false,
    "LiteMetrics": false,
    "LogRequestResponseConfig": ""
  }
}

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.