调用CreateNatGateway创建NAT网关。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ens:CreateNatGateway |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Name |
string |
否 |
NAT 网关名称。长度为 1~128 个字符,但不能以 |
name |
| EnsRegionId |
string |
是 |
ENS 节点 ID。 |
cn-suzhou-telecom |
| NetworkId |
string |
是 |
网络 ID。 |
n-5qj7ykuxmjn7k96l090sp**** |
| VSwitchId |
string |
否 |
交换机 ID。 |
vsw-5savh5ngxh8sbj14bu7n**** |
| InstanceType |
string |
否 |
NAT 规格。取值:enat.default。 枚举值:
|
enat.default |
| Tag |
array<object> |
否 |
资源标签 |
|
|
object |
否 |
标签键值对数组。 |
||
| Key |
string |
否 |
实例的标签键。N 的取值范围为 1~20。
|
team |
| Value |
string |
否 |
资源的标签值。N 的取值范围:1~20。一旦传入该值,可以为空字符串。最多支持 128 个字符,不能以 acs:开头,不能包含 http://或者 https://。 |
Deep |
| InstanceBillingCycle |
string |
否 |
实例计费周期。取值:Hour(小时)、Month(月)。 枚举值:
|
Hour |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| NatGatewayId |
string |
创建的 NAT 网关的实例 ID。 |
nat-5t7nh1cfm6kxiszlttr38**** |
示例
正常返回示例
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"NatGatewayId": "nat-5t7nh1cfm6kxiszlttr38****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ens.interface.error | An error occurred while call the API. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | InvalidParameter.RegionNotSupported | The specified EnsRegion does not support this operation. | |
| 400 | InvalidParameter.VSwitchNotFound | The specified VSwitch is not found. | |
| 400 | InvalidParameter.VSwitchNotBelongToNetwork | The specified VSwitch is not bound to the Network | |
| 400 | InvalidParameter.NetworkNotFound | The specified Network is not found. | |
| 400 | InvalidParameter.NetworkNotSupported | The specified Network does not support this operation. | |
| 400 | QuotaExceed.NatGateway | The maximum number of natGateway is reached. | |
| 400 | SaleControl.VerificationFailed | You did not pass the salecontrol verification.Please contact the product. | 创建资源的时候没有通过资源的售卖约束校验 |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。