创建网关。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
eas:CreateGateway |
create |
*Gateway
|
无 | 无 |
请求语法
POST /api/v2/gateways HTTP/1.1
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
ResourceName |
string |
否 |
资源组名称。请参见 ListResources 接口返回的,ResourceType 为 SelfManaged 的 ResourceName 字段。 |
eas-r-4gt8twzwllfo****** |
body |
object |
否 |
请求 Body。 |
|
InstanceType |
string |
否 |
私有网关使用的机型。取值如下:
|
2c4g |
EnableIntranet |
boolean |
否 |
开启内网访问(默认值为 true)。 枚举值:
|
true |
EnableInternet |
boolean |
否 |
开启公网访问(默认值为 false)。 枚举值:
|
false |
Name |
string |
否 |
私有网关别名。 |
mygateway1 |
Replicas |
integer |
否 |
私有网关节点数。 |
2 |
ChargeType |
string |
否 |
付费类型,取值如下:
|
PostPaid |
AutoRenewal |
boolean |
否 |
是否自动续费,取值如下:
|
|
GatewayType |
string |
否 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
返回结果。 |
||
RequestId |
string |
请求 ID。 |
40325405-579C-4D82**** |
GatewayId |
string |
私有网关 ID。 |
gw-1uhcqmsc7x22****** |
ClusterId |
string |
私有网关所在地域。 |
cn-wulanchabu |
Message |
string |
请求返回信息。 |
Successfully create gateway for user-managed resource |
示例
正常返回示例
JSON
格式
{
"RequestId": "40325405-579C-4D82****",
"GatewayId": "gw-1uhcqmsc7x22******",
"ClusterId": "cn-wulanchabu",
"Message": "Successfully create gateway for user-managed resource"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。