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 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:
|
POSTPAY |
| MserVersion |
string |
No |
The edition of the gateway.
|
mse_pro |
| Spec |
string |
No |
The instance type of the gateway. This parameter is required for non-serverless instances.
Valid values:
|
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 |
| NlbNetworkType |
string |
No |
The network type of the provisioned Network Load Balancer (NLB) instance.
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.
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.
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.
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
|
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.
|
请求处理成功 |
| Code |
integer |
The response code. |
200 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
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.