All Products
Search
Document Center

Microservices Engine:AddGateway

Last Updated:Nov 20, 2024

Adds a gateway.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
mse:AddGatewaycreate
*Gateway
acs:mse:{#regionId}:{#accountId}:instance/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringNo

The ID of the region.

test-ceshi
RegionstringYes

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

  • slb.s1.small
  • slb.s2.small
  • slb.s2.medium
  • slb.s3.small
  • slb.s3.medium
  • slb.s3.large
cn-hangzhou
SlbSpecstringNo

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

  • slb.s1.small
  • slb.s2.small
  • slb.s2.medium
  • slb.s3.small
  • slb.s3.medium
  • slb.s3.large
slb.s2.small
VpcstringYes

The ID of the primary vSwitch.

vpc-bp15mncnrtm83uauxd1xb
VSwitchIdstringNo

The ID of the primary vSwitch.

vsw-bp1q8th57frl5khj2li43
SpecstringNo

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
ReplicaintegerNo

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

2
InternetSlbSpecstringNo

The specifications of the Internet-facing Server Load Balancer (SLB) instance. Valid values:

  • slb.s1.small
  • slb.s2.smal
  • slb.s2.medium
  • slb.s3.small
  • slb.s3.medium
  • slb.s3.large
slb.s2.small
VSwitchId2stringNo

Specifies whether to use an advanced security group.

vsw-wz9bu6o5vsvitt5mrxo6s
EnterpriseSecurityGroupbooleanNo

Specifies whether to enable hardware acceleration.

false
EnableHardwareAccelerationbooleanNo

Specifies whether to activate Tracing Analysis.

false
EnableXtracebooleanNo

The sampling rate of Tracing Analysis. Valid values: [1,100].

false
XtraceRatiostringNo

Specifies whether to activate Log Service.

10
EnableSlsbooleanNo

The tag of the gateway.

false
Tagarray<object>No

The tag object.

objectNo

The key of the tag.

KeystringNo

The value of the tag.

key
ValuestringNo

The ID of the resource group.

value
ResourceGroupIdstringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English
rg-acfm34x43l*****
RequestParsstringNo

The extended field.

{}
ZoneInfoarray<object>Yes

The details of the zone.

objectYes
ZoneIdstringNo

The zone ID.

cn-shenzhen-e
VSwitchIdstringNo

The vSwitch ID.

vsw-bp*****
ChargeTypestringNo

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

Valid values:

  • PREPAY: subscription
  • POSTPAY: pay-as-you-go
POSTPAY
MserVersionstringNo

The MSE instance type. Valid values:

  • mse_pro: ordinary instance
  • mse_serverless: serverless instance
mse_pro
NlbNetworkTypestringNo

The network type of the Network Load Balancer (NLB) instance you specify when you purchase a serverless instance.

  • pubnet: Internet
  • privatenet: private network
  • privatepubnet: Internet and private network
pubnet
ClbNetworkTypestringNo

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

  • pubnet: Internet
  • privatenet: private network
  • privatepubnet: Internet and private network
pubnet
AcceptLanguagestringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English
zh

Response parameters

ParameterTypeDescriptionExample
object

The ID of the request.

RequestIdstring

The HTTP status code returned.

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

The message returned.

  • If the request is successful, a success message is returned.
  • If the request fails, an error message is returned.
200
Messagestring

The request is successfully processed.

The return value.
Codeinteger

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
200
Successboolean

The returned data.

true
Dataobject

The unique ID of the gateway.

GatewayUniqueIdstring

code

gw-5017305290e14cebbrvec4a5****

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400IllegalRequestInvalid request:%sInvalid request: %s
400InvalidParameterParameter error:%sRequest parameter error: %s
403NoPermissionYou are not authorized to perform this operation:%sYou do not have the permission to use this interface:%s
404NotFoundNot found:%sThe resource does not exist:%s
500InternalErrorConsole error. Try again later:%sConsole error. Try again later: %s

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-06-21The request parameters of the API has changedView Change Details
2023-10-11The request parameters of the API has changedView Change Details
2023-05-09The request parameters of the API has changedView Change Details
2023-05-09The request parameters of the API has changedView Change Details
2023-04-17The request parameters of the API has changedView Change Details
2021-12-29The request parameters of the API has changedView Change Details
2021-12-29The request parameters of the API has changedView Change Details