Creates a gateway.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:AddGateway |
create |
*Gateway
|
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 |
| Spec |
string |
No |
The node specifications you specify when you purchase an ordinary instance. Valid values:
|
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 |
| NlbNetworkType |
string |
No |
The network type of the purchased NLB instance. Valid values:
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:
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:
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:
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 |
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.
|
The return value. |
| Code |
integer |
The return value. |
200 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
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.