All Products
Search
Document Center

Microservices Engine:AddGateway

Last Updated:Mar 19, 2026

Creates 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:AddGateway

create

*Gateway

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

None None

Request parameters

Parameter

Type

Required

Description

Example

Name

string

No

The name of the gateway.

test-ceshi

Region

string

Yes

The ID of the region where the gateway is deployed.

cn-hangzhou

Vpc

string

Yes

The ID of the Virtual Private Cloud (VPC).

vpc-bp15mncnrtm83uauxd1xb

ZoneInfo

array<object>

Yes

The zone information. This parameter is required for multi-zone deployments.

object

No

An object that contains zone information.

ZoneId

string

No

The ID of the zone.

cn-shenzhen-e

VSwitchId

string

No

The ID of the vSwitch.

vsw-bp*****

VSwitchId

string

No

The ID of the primary vSwitch. This parameter is required for single-zone deployments.

vsw-bp1q8th57frl5khj2li43

VSwitchId2

string

No

The ID of the secondary vSwitch. This parameter is required for multi-zone deployments.

vsw-wz9bu6o5vsvitt5mrxo6s

ChargeType

string

No

The billing method of the gateway. This parameter is required for non-serverless instances.

Valid values:

  • PREPAY :

    Subscription

  • POSTPAY :

    Pay-As-You-Go

POSTPAY

MserVersion

string

No

The edition of the gateway.

  • mse_premium: Professional Edition

  • mse_pro: Standard Edition

  • mse_serverless: Serverless Edition

mse_pro

Spec

string

No

The instance type of the gateway. This parameter is required for non-serverless instances.

  • MSE_GTW_16_32_200_c (16 Cores 32 GB)

  • MSE_GTW_2_4_200_c (2 Cores 4 GB)

  • MSE_GTW_4_8_200_c (4 Cores 8 GB)

  • MSE_GTW_8_16_200_c (8 Cores 16 GB)

Valid values:

  • MSE_GTW_16_32_200_c :

    16 Cores 32 GB

  • MSE_GTW_2_4_200_c :

    2 Cores, 4 GB

  • MSE_GTW_4_8_200_c :

    4 Cores, 8 GB

  • MSE_GTW_8_16_200_c :

    8 Cores 16 GB

MSE_GTW_2_4_200_c

Replica

integer

No

The number of gateway nodes. This parameter is required for non-serverless instances.

2

ManagedEntryNetworkType

string

No

The ingress type of the gateway. This parameter applies only to Professional Edition instances.

  • pubnet: Public Network

  • privatenet: Private Network

  • privatepubnet: Public and Private Networks

pubnet

NlbNetworkType

string

No

The network type of the provisioned Network Load Balancer (NLB) instance.

  • pubnet: Public Network

  • privatenet: Private Network

  • privatepubnet: Public and Private Networks

Note

For non-serverless instances, you can provision only one of the following load balancer types: a Network Load Balancer (NLB) instance, a pay-by-LCU Classic Load Balancer (CLB) instance, or a pay-by-specification CLB instance.

Note

For Serverless instances, you can provision either an NLB instance or a pay-by-LCU CLB instance.

pubnet

ClbNetworkType

string

No

The network type of the provisioned pay-by-LCU Classic Load Balancer (CLB) instance.

  • pubnet: Public Network

  • privatenet: Private Network

  • privatepubnet: Public and Private Networks

Note

For non-serverless instances, you can provision only one of the following load balancer types: a Network Load Balancer (NLB) instance, a pay-by-LCU Classic Load Balancer (CLB) instance, or a pay-by-specification CLB instance.

Note

For Serverless instances, you can provision either an NLB instance or a pay-by-LCU CLB instance.

pubnet

SlbSpec deprecated

string

No

The specifications of the internal-facing Classic Load Balancer (CLB) instance. This parameter applies to non-serverless instances.

  • slb.s1.small

  • slb.s2.small

  • slb.s2.medium

  • slb.s3.small

  • slb.s3.medium

  • slb.s3.large

Note

For non-serverless instances, you can provision only one of the following load balancer types: a Network Load Balancer (NLB) instance, a pay-by-LCU Classic Load Balancer (CLB) instance, or a pay-by-specification CLB instance.

Note

For Serverless instances, you can provision either an NLB instance or a pay-by-LCU CLB instance.

slb.s2.small

InternetSlbSpec deprecated

string

No

The specifications of the public-facing Classic Load Balancer (CLB) instance. This parameter applies to non-serverless instances.

  • slb.s1.small

  • slb.s2.small

  • slb.s2.medium

  • slb.s3.small

  • slb.s3.medium

  • slb.s3.large

Note

For non-serverless instances, you can provision only one of the following load balancer types: a Network Load Balancer (NLB) instance, a pay-by-LCU Classic Load Balancer (CLB) instance, or a pay-by-specification CLB instance.

Note

For Serverless instances, you can provision either an NLB instance or a pay-by-LCU CLB instance.

slb.s2.small

EnterpriseSecurityGroup

boolean

No

Specifies whether to use an Enterprise Security Group.

false

EnableHardwareAcceleration

boolean

No

Specifies whether to enable hardware acceleration.

false

EnableXtrace

boolean

No

Specifies whether to enable Tracing Analysis.

false

XtraceRatio

string

No

The sampling rate for Tracing Analysis. Valid values are integers from 1 to 100.

10

EnableSls

boolean

No

Specifies whether to enable log delivery to Simple Log Service (SLS).

false

Tag

array<object>

No

An array of tags to add to the gateway.

object

No

A tag object.

Key

string

No

The key of the tag.

key

Value

string

No

The value of the tag.

value

ResourceGroupId

string

No

The ID of the Resource Group.

rg-acfm34x43l*****

RequestPars

string

No

The extended request parameters, in JSON format.

{}

AcceptLanguage

string

No

The language of the response. If you omit this parameter, the default value en is used.

  • zh: Chinese

  • en: English

zh

Response elements

Element

Type

Description

Example

object

The response data structure.

RequestId

string

The request ID.

2F46B9E7-67EF-5C8A-BA52-D38D5B32AF2C

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The response message.

  • A success message is returned if the request is successful.

  • An error message is returned if the request fails.

请求处理成功

Code

integer

The response code.

200

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request succeeded.

  • false: The request failed.

true

Data

object

The response data.

GatewayUniqueId

string

The unique gateway ID.

gw-5017305290e14cebbrvec4a5****

Examples

Success response

JSON format

{
  "RequestId": "2F46B9E7-67EF-5C8A-BA52-D38D5B32AF2C",
  "HttpStatusCode": 200,
  "Message": "请求处理成功",
  "Code": 200,
  "Success": true,
  "Data": {
    "GatewayUniqueId": "gw-5017305290e14cebbrvec4a5****"
  }
}

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.