将普通型NAT网关切换为增强型NAT网关。
接口说明
使用说明
调用UpdateNatGatewayNatType接口前,请先了解以下内容:
-
UpdateNatGatewayNatType接口属于异步接口,即系统会先返回一个请求ID,但NAT网关的网关类型并未升级完成,系统后台的升级任务仍在进行。您可以调用GetNatGatewayConvertStatus查询NAT网关的升级状态,更多信息,请参见GetNatGatewayConvertStatus。
-
当NAT网关的升级状态处于processing时,表示正在升级中,在该状态下,您只能执行查询操作,不能执行其他操作。
-
当NAT网关的升级状态处于successful时,表示NAT网关的网关类型升级完成。
-
当NAT网关的升级状态处于failed时,表示NAT网关的网关类型升级失败。
-
-
UpdateNatGatewayNatType接口在同一个NAT网关中不支持并发升级NAT网关的网关类型。
-
增强型NAT网关与普通型NAT网关的计费相同,升级过程和升级后计费方式不会改变。
-
每个资源升级过程可能会持续5分钟,升级过程中会出现1~2次秒级闪断,业务重连即可恢复。重连机制为自动重连还是手动重连由业务本身决定。
-
仅支持将普通型NAT网关升级至增强型NAT网关,不支持将增强型NAT网关降级至普通型NAT网关。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
vpc:UpdateNatGatewayNatType | Write |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RegionId | string | 是 | 要升级的普通型公网NAT网关所属的地域ID。 您可以通过调用DescribeRegions接口获取地域ID。 | cn-qingdao |
NatGatewayId | string | 是 | 要升级的普通型公网NAT网关实例ID。 | ngw-bp1b0lic8uz4r6vf2**** |
VSwitchId | string | 是 | 升级后增强型公网NAT网关所属的交换机。 说明
如果不设置该参数,系统会随机将增强型公网NAT网关创建在VPC内的任意一台交换机。
| vsw-bp17nszybg8epodke**** |
NatType | string | 是 | 公网NAT网关类型。取值:Enhanced,表示增强型公网NAT网关。 | Enhanced |
DryRun | boolean | 否 | 是否只预检此次请求,取值: true:发送请求,不会升级公网NAT网关类型。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码 false(默认值):发送正常请求,通过检查后返回2xx HTTP状态码并直接升级公网NAT网关类型。 | false |
ClientToken | string | 否 | 客户端Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符。 说明
若您未指定,则系统自动使用API请求的RequestId作为ClientToken标识。每次API请求的RequestId可能不一样。
| 0c593ea1-3bea-11e9-b96b-88e9fe637760 |
返回参数
示例
正常返回示例
JSON
格式
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | OperationUnsupported.NatConvert | The NAT gateway conversion function is not supported. | NAT网关类型转换功能未支持。 |
400 | NATGW_NOT_EXIST | The specified NAT gateway does not exist. | 该 NAT 网关不存在。 |
400 | OperationFailed.VpcNotExist | The specified VPC does not exist. | 指定的VPC不存在。 |
400 | OperationFailed.VswNotExist | The specified VSwitch does not exist. | 指定的交换机不存在。 |
400 | OperationFailed.NatTypeNotEnhanced | Operation failed because the specified NAT gateway type is not enhanced. | 操作失败因为指定的NAT网关类型不是增强型。 |
400 | OperationFailed.NatGwBindWithBandwidthPackage | Operation failed because the NAT gateway is bound to bandwidth packages. | 操作失败因为NAT网关实例绑定了NAT带宽包。 |
400 | IncorrectStatus.NatGateway | The status of NAT gateway is incorrect. | NAT网关状态不对。 |
400 | OperationFailed.EipInMiddleStatus | Operation failed because the status of EIP associated with the specified NAT gateway is abnormal. | 操作失败因为绑定在此NAT网关上的EIP状态异常。 |
400 | OperationFailed.SnatInMiddleStatus | Operation failed because the status of the SNAT entry of the specified NAT gateway is abnormal. | 操作失败因为指定的NAT网关的SNAT条目状态异常。 |
400 | OperationFailed.DnatInMiddleStatus | Operation failed because the status of the DNAT entry associated with the NAT gateway is abnormal. | 操作失败因为NAT网关的DNAT规则状态异常。 |
400 | OperationFailed.NatGwRouteInMiddleStatus | Operation failed because the status of the route entry associated with the NAT gateway is abnormal. | 操作失败因为NAT网关相关的路由条目状态异常。 |
400 | OperationFailed.EnhancedInventoryNotEnough | The enhanced NAT gateway inventory is insufficient in the specified zone. | 当前可用区增强NAT网关库存不足。 |
400 | OperationFailed.EnhancedUserIsUnAuthorized | Operation failed because the user is not authorized to create an enhanced NAT gateway. | 操作失败因为用户未授权创建增强型NAT网关。 |
400 | OperationFailed.EnhancedRegion | Operation failed because enhanced NAT gateways are not available for sale in the specified region. | 操作失败因为当前地域未开启增强型NAT网关售卖。 |
400 | OperationFailed.EnhancedQuotaExceed | Operation failed because the maximum number of enhanced NAT gateways in the same VPC is exceeded. | 操作失败因为当前VPC下的增强型NAT网关数量超过限制。 |
400 | InvalidBandwidthPackageIdNumber.NotSupported | The number of BandwidthPackageIds exceeds the limit. | 共享带宽包的数量超过Quota限制。 |
400 | OperationFailed.VswNotBelongToVpc | Operation failed because the specified VSwitch is not bound to the same VPC with NAT gateway. | 操作失败,因为交换机和NAT网关不属于同一个VPC。 |
400 | OperationUnsupported.VpcAttachedCen | Operation failed because the VPC is attached to CEN. | 操作失败因为VPC加入了CEN。 |
400 | OperationUnsupported.RouterInterfaceExist | Operation failed because the VPC has a router interface. | 操作失败因为VPC有路由器接口存在。 |
400 | OperationFailed.VRouterNotExist | Operation failed because the VRouter does not exist. | 操作失败因为虚拟路由器不存在。 |
400 | OperationFailed.SnatQuotaExceed | Operation failed because the maximum number of SNAT entry is exceeded. | 操作失败因为SNAT条目数量过多。 |
400 | OperationFailed.DnatQuotaExceed | Operation failed because the maximum number of forward entry is exceeded. | 操作失败因为DNAT条目数量过多。 |
400 | OperationFailed.VswBindedRouteTable | The operation failed because a custom route table that contains subnet routes is associated with the specified VSwitch. | 操作失败因为vSwitch绑定了子网路由表。 |
400 | OperationFailed.VswBindedAcl | The operation failed because a network ACL is associated with the specified VSwitch. | 操作失败因为指定的vSwitch绑定了网络ACL。 |
400 | Forbidden.Convert | User does not have permission to operate. | 该用户没有权限操作。 |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | 指定的RegionId不存在。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 | ||||||
---|---|---|---|---|---|---|---|---|
2023-03-01 | OpenAPI 错误码发生变更 | 看变更集 | ||||||
|