文档

UpdateNatGatewayNatType - 将普通型NAT网关切换为增强型

更新时间:

将普通型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:UpdateNatGatewayNatTypeWrite
  • NatGateway
    acs:vpc:{#regionId}:{#accountId}:natgateway/{#NatGatewayId}

请求参数

名称类型必填描述示例值
RegionIdstring

要升级的普通型公网 NAT 网关所属的地域 ID。

您可以通过调用 DescribeRegions 接口获取地域 ID。

cn-qingdao
NatGatewayIdstring

要升级的普通型公网 NAT 网关实例 ID。

ngw-bp1b0lic8uz4r6vf2****
VSwitchIdstring

升级后增强型公网 NAT 网关所属的交换机。

说明 如果不设置该参数,系统会随机将增强型公网 NAT 网关创建在 VPC 内的任意一台交换机。
vsw-bp17nszybg8epodke****
NatTypestring

公网 NAT 网关类型。取值:Enhanced,表示增强型公网 NAT 网关。

Enhanced
DryRunboolean

是否只预检此次请求,取值:

true:发送请求,不会升级公网 NAT 网关类型。检查项包括 AccessKey 是否有效、RAM 用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DryRunOperation

false(默认值):发送正常请求,通过检查后返回 2xx HTTP 状态码并直接升级公网 NAT 网关类型。

false
ClientTokenstring

客户端 Token,用于保证请求的幂等性。

从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。

说明 若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。
0c593ea1-3bea-11e9-b96b-88e9fe637760

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

0ED8D006-F706-4D23-88ED-E11ED28DCAC0

示例

正常返回示例

JSON格式

{
  "RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}

错误码

HTTP status code错误码错误信息描述
400OperationUnsupported.NatConvertThe NAT gateway conversion function is not supported.NAT网关类型转换功能未支持。
400NATGW_NOT_EXISTThe specified NAT gateway does not exist.该 NAT 网关不存在。
400OperationFailed.VpcNotExistThe specified VPC does not exist.指定的VPC不存在。
400OperationFailed.VswNotExistThe specified VSwitch does not exist.指定的交换机不存在。
400OperationFailed.NatTypeNotEnhancedOperation failed because the specified NAT gateway type is not enhanced.操作失败因为指定的NAT网关类型不是增强型。
400OperationFailed.NatGwBindWithBandwidthPackageOperation failed because the NAT gateway is bound to bandwidth packages.操作失败因为NAT网关实例绑定了NAT带宽包。
400IncorrectStatus.NatGatewayThe status of NAT gateway is incorrect.NAT网关状态不对。
400OperationFailed.EipInMiddleStatusOperation failed because the status of EIP associated with the specified NAT gateway is abnormal.操作失败因为绑定在此NAT网关上的EIP状态异常。
400OperationFailed.SnatInMiddleStatusOperation failed because the status of the SNAT entry of the specified NAT gateway is abnormal.操作失败因为指定的NAT网关的SNAT条目状态异常。
400OperationFailed.DnatInMiddleStatusOperation failed because the status of the DNAT entry associated with the NAT gateway is abnormal.操作失败因为NAT网关的DNAT规则状态异常。
400OperationFailed.NatGwRouteInMiddleStatusOperation failed because the status of the route entry associated with the NAT gateway is abnormal.操作失败因为NAT网关相关的路由条目状态异常。
400OperationFailed.EnhancedInventoryNotEnoughThe enhanced NAT gateway inventory is insufficient in the specified zone.当前可用区增强NAT网关库存不足。
400OperationFailed.EnhancedUserIsUnAuthorizedOperation failed because the user is not authorized to create an enhanced NAT gateway.操作失败因为用户未授权创建增强型NAT网关。
400OperationFailed.EnhancedRegionOperation failed because enhanced NAT gateways are not available for sale in the specified region.操作失败因为当前地域未开启增强型NAT网关售卖。
400OperationFailed.EnhancedQuotaExceedOperation failed because the maximum number of enhanced NAT gateways in the same VPC is exceeded.操作失败因为当前VPC下的增强型NAT网关数量超过限制。
400InvalidBandwidthPackageIdNumber.NotSupportedThe number of BandwidthPackageIds exceeds the limit.共享带宽包的数量超过Quota限制。
400OperationFailed.VswNotBelongToVpcOperation failed because the specified VSwitch is not bound to the same VPC with NAT gateway.操作失败,因为交换机和NAT网关不属于同一个VPC。
400OperationUnsupported.VpcAttachedCenOperation failed because the VPC is attached to CEN.操作失败因为VPC加入了CEN。
400OperationUnsupported.RouterInterfaceExistOperation failed because the VPC has a router interface.操作失败因为VPC有路由器接口存在。
400OperationFailed.VRouterNotExistOperation failed because the VRouter does not exist.操作失败因为虚拟路由器不存在。
400OperationFailed.SnatQuotaExceedOperation failed because the maximum number of SNAT entry is exceeded.操作失败因为SNAT条目数量过多。
400OperationFailed.DnatQuotaExceedOperation failed because the maximum number of forward entry is exceeded.操作失败因为DNAT条目数量过多。
400OperationFailed.VswBindedRouteTableThe operation failed because a custom route table that contains subnet routes is associated with the specified VSwitch.操作失败因为vSwitch绑定了子网路由表。
400OperationFailed.VswBindedAclThe operation failed because a network ACL is associated with the specified VSwitch.操作失败因为指定的vSwitch绑定了网络ACL。
400Forbidden.ConvertUser does not have permission to operate.该用户没有权限操作。
404InvalidRegionId.NotFoundThe specified RegionId does not exist in our records.指定的RegionId不存在。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-03-01OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
    删除错误码:404
  • 本页导读 (1)
文档反馈