All Products
Search
Document Center

Microservices Engine:AddGateway

Last Updated:Dec 05, 2025

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 gateway name.

test-ceshi

Region

string

Yes

The region of the gateway.

cn-hangzhou

Vpc

string

Yes

The virtual private cloud (VPC) ID.

vpc-bp15mncnrtm83uauxd1xb

ZoneInfo

array

Yes

The zone information.

object

No

The zone information.

ZoneId

string

No

The zone ID.

cn-shenzhen-e

VSwitchId

string

No

The vSwitch ID.

vsw-bp*****

VSwitchId

string

No

The primary vSwitch ID.

vsw-bp1q8th57frl5khj2li43

VSwitchId2

string

No

The secondary vSwitch ID.

vsw-wz9bu6o5vsvitt5mrxo6s

ChargeType

string

No

The billing method you specify when you purchase an ordinary instance.

POSTPAY

MserVersion

string

No

The MSE instance type. Valid values:

  • mse_pro: ordinary instance

  • mse_serverless: Serverless

mse_pro

Spec

string

No

The node specifications you specify when you purchase an ordinary instance. Valid values:

  • MSE_GTW_16_32_200_c(16C32G)

  • MSE_GTW_2_4_200_c(2C4G)

  • MSE_GTW_4_8_200_c(4C8G)

  • MSE_GTW_8_16_200_c(8C16G)

MSE_GTW_2_4_200_c

Replica

integer

No

The number of nodes you specify when you purchase an ordinary instance.

2

ManagedEntryNetworkType

string

No

The ingress type of the gateway. This parameter applies to common instances that use the Professional Edition.

  • pubnet: Internet

  • privatenet: VPC

  • privatepubnet: Internet and VPC

pubnet

NlbNetworkType

string

No

The network type of the purchased NLB instance. Valid values:

  • pubnet: Internet

  • privatenet: VPC

  • privatepubnet: Internet and VPC

Note

Traditional instances: When creating, you can only choose one type of purchase from NLB, CLB billed based on LCUs, or CLB billed based on specifications

Note

Serverless instances: When creating, you can only choose one type of purchase from NLB or CLB billed based on LCUs

pubnet

ClbNetworkType

string

No

The network type of the purchased Classic Load Balancer (CLB) instance that is billed based on LCUs. Valid values:

  • pubnet: Internet

  • privatenet: VPC

  • privatepubnet: Internet and VPC

Note

Traditional instances: When creating, you can only choose one type of purchase from NLB, CLB billed based on LCUs, or CLB billed based on specifications

Note

Serverless instances: When creating, you can only choose one type of purchase from NLB or CLB billed based on LCUs

pubnet

SlbSpec deprecated

string

No

The specifications of the internal-facing Server Load Balancer (SLB) instance (applicable to traditional instances). Valid values:

  • slb.s1.small

  • slb.s2.small

  • slb.s2.medium

  • slb.s3.small

  • slb.s3.medium

  • slb.s3.large

Note

Traditional instances: When creating, you can only choose one type of purchase from NLB, CLB billed based on LCUs, or CLB billed based on specifications

Note

Serverless instances: When creating, you can only choose one type of purchase from NLB or CLB billed based on LCUs

slb.s2.small

InternetSlbSpec deprecated

string

No

The specifications of the Internet-facing SLB instance (applicable to traditional instances). Valid values:

  • slb.s1.small

  • slb.s2.smal

  • slb.s2.medium

  • slb.s3.small

  • slb.s3.medium

  • slb.s3.large

Note

Traditional instances: When creating, you can only choose one type of purchase from NLB, CLB billed based on LCUs, or CLB billed based on specifications

Note

Serverless instances: When creating, you can only choose one type of purchase from NLB or CLB billed based on LCUs

slb.s2.small

EnterpriseSecurityGroup

boolean

No

Specifies whether to use an advanced 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 sample rate of Tracing Analysis. Valid values: [1,100].

10

EnableSls

boolean

No

Specifies whether to enable SLS log delivery.

false

Tag

array

No

The tag of the gateway.

object

No

A tag.

Key

string

No

The tag key.

key

Value

string

No

The tag value.

value

ResourceGroupId

string

No

The resource group ID.

rg-acfm34x43l*****

RequestPars

string

No

The extension field.

{}

AcceptLanguage

string

No

The language of the response. Valid values:

  • zh: Chinese

  • en: English

zh

Response elements

Parameter

Type

Description

Example

object

The data structure.

RequestId

string

The request ID.

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

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The message that is returned for the request.

  • If the request is successful, a success message is returned.

  • If the request fails, an error message is returned.

The return value.

Code

integer

The return value.

200

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Data

object

The response data.

GatewayUniqueId

string

The unique ID of the gateway.

gw-5017305290e14cebbrvec4a5****

Examples

Success response

JSON format

{
  "RequestId": "2F46B9E7-67EF-5C8A-BA52-D38D5B32AF2C",
  "HttpStatusCode": 200,
  "Message": "The return value.\n",
  "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.