全部产品
Search
文档中心

专有网络 VPC:ModifyNatGatewayAttribute - 修改NAT网关的名称和描述

更新时间:Mar 04, 2024

调用ModifyNatGatewayAttribute接口修改NAT网关的名称和描述。

接口说明

本接口查询的 NAT 网关包括公网 NAT 网关和 VPC NAT 网关,文中出现的“NAT 网关”不做具体的区分。

调试

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

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
vpc:ModifyNatGatewayAttributeWrite
  • NatGateway
    acs:vpc:{#regionId}:{#accountId}:natgateway/{#NatGatewayId}

请求参数

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

要修改的 NAT 网关所在的地域 ID。

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

cn-hangzhou
NatGatewayIdstring

要修改的 NAT 网关的 ID。

ngw-2ze0dcn4mq31qx2jc****
Namestring

要修改的 NAT 网关名称。

名称长度为 1~128 个字符,不能以http://https://开头。

nat123
Descriptionstring

要修改的 NAT 网关描述信息。

描述长度为 1~128 个字符,不能以http://https://开头。

Description
IcmpReplyEnabledboolean

是否开启 ICMP 代回。取值:

  • true(默认值):开启。
  • false:不开启。
true
EipBindModestring

修改 NAT 网关的 EIP 绑定模式。取值:可以为空,非空时只允许为 NAT,表示绑定模式为 EIP 普通模式。

说明
  • 只支持将MULTI_BINDED模式修改为 NAT 模式,不支持将 NAT 模式修改为MULTI_BINDED模式。关于MULTI_BINDED模式的具体信息,请参见 CreateNatGateway
    • 在 EIP 绑定模式切换过程中网络连接会出现秒级别闪断(闪断时间随着 EIP 数量增加而变长,目前最多支持绑定 5 个 EIP 的 NAT 网关进行配置变更),请您尽量在业务低峰期执行切换操作。
    • EIP 绑定模式变更为 NAT 后,公网 NAT 网关将兼容 IPv4 网关,但绑定一个公网 EIP 时将占用 NAT 网关所在交换机的一个私网 IP,请确保 NAT 网关所在交换机内私网 IP 地址充足,如果 NAT 网关所在的交换机没有可用的空闲私网地址时,将无法绑定新的 EIP。
    NAT

    返回参数

    名称类型描述示例值
    object

    请求 ID。

    RequestIdstring

    请求 ID。

    AB5F62CF-2B60-4458-A756-42C9DFE108D1

    示例

    正常返回示例

    JSON格式

    {
      "RequestId": "AB5F62CF-2B60-4458-A756-42C9DFE108D1"
    }

    错误码

    HTTP status code错误码错误信息描述
    400UnsupportedFeature.PrivateLinkModeThe feature of %s is not supported.暂不支持反向访问特性。
    400IncorrectStatus.NATGWNATGW status is invalid.NAT网关的状态不正确。
    400ExclusiveParam.%sAnd%sThe param of %s and %s are mutually exclusive.参数 %s 和 %s 相互排斥。
    400IncorrectStatus.NatGatewayThe status of natgateway is incorrect.NAT网关的状态不正确。
    400DependencyViolation.PrivateLinkModeThe specified resource of %s depends on %s, so the operation cannot be completed.%s 资源依赖于 %s,因此本操作不能完成。
    400UnsupportedFeature.IcmpReplyEnabledThe feature of IcmpReplyEnabled is not supported.Icmp 代答使能功能修改不支持。
    400InvalidParams.NotNullThe parameter must not be null, name or description or icmpReplyEnabled名称、描述以及icmp代答使能参数不能同时为空。
    400InvalidParameter.Name.MalformedThe specified Name is not valid.该名称不合法,请您按照正确的格式书写名称。
    400InvalidParameter.Description.MalformedThe specified Description is not valid.该描述不合法。
    400UnsupportedFeature.IndirectConvertForVpcNatThe VPC NAT gateway is not support to change EIP bond type.VPC NAT网关不支持修改EIP的绑定类型。
    400UnsupportedFeature.NormalNatModifyEipBindModeThe normal NAT gateway is not support to change EIP bond type.普通型NAT网关不支持修改EIP绑定类型。
    400OperationDenied.EipBondTypeIsAlreadyNATThe EIP bond type is already NAT type.EIP绑定类型已经是NAT类型。
    400UnsupportedFeature.IndirectConvertForFwNatThe security protection enabled NAT gateway is not support change EIP bond type.开启防护功能的公网NAT不支持修改EIP绑定类型。
    400QuotaExceeded.EipNumForModifyEipBondTypeThe quota of %s is exceeded, binded: %s, quota: %s.修改EIP绑定类型时允许的EIP个数超限
    400ResourceNotEnough.SwitchAvailableIpsThe available private Ip number is not enough in your subnet.子网中可用的私网IP不足。
    400UnsupportedFeature.VpcNatSecurityProtectionEnabledThe VPC NAT gateway is not supported to enable security protection.VPC NAT网关不支持开启安全防护。
    400OperationDenied.NatGatewayStatusInvalidThe NAT gateway status is invalid.NAT网关的状态无效。
    400OperationDenied.EipStatusInvalidThe NAT gateway has EIP in invalid status.NAT网关绑定的EIP状态无效。
    400OperationDenied.SnatEntryStatusInvalidThe NAT gateway has SNAT entry in invalid status.NAT网关配置的SNAT条目状态无效。
    400OperationDenied.DnatEntryStatusInvalidThe NAT gateway has DNAT entry in invalid status.NAT网关配置的DNAT状态无效。
    400UnsupportedFeature.MutilBindedTypeNatEnableFwThe NAT with Mutil-Binded Eip bind type is not support enable firewall.以Mutil-Binded方式绑定EIP的NAT不允许开启防火墙。
    400Forbidden.FinancialLockedThe instance is locked due to outstanding payments.该实例已欠费锁定,无法操作
    403Forbidden.ModifyEipBondTypeAuthentication is failed for modify EIP bond type.不允许修改EIP绑定类型。
    404InvalidRegionId.NotFoundThe specified RegionId does not exist in our records.指定的RegionId不存在。
    404InvalidNatGatewayId.NotFoundThe specified NatGatewayId does not exist in our records.指定的 NatGatewayId 不存在,请您检查填写的 NatGatewayId 是否正确。

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

    变更历史

    变更时间变更内容概要操作
    2024-01-18OpenAPI 描述信息更新、OpenAPI 错误码发生变更看变更集
    变更项变更内容
    API 描述OpenAPI 描述信息更新
    错误码OpenAPI 错误码发生变更
      错误码 400 变更
      删除错误码:403
      删除错误码:404
    2023-03-01OpenAPI 错误码发生变更看变更集
    变更项变更内容
    错误码OpenAPI 错误码发生变更
      删除错误码:400
      删除错误码:403
      删除错误码:404
    2022-10-13OpenAPI 错误码发生变更、OpenAPI 入参发生变更看变更集
    变更项变更内容
    错误码OpenAPI 错误码发生变更
      错误码 400 变更
      删除错误码:404
      新增错误码:403
    入参OpenAPI 入参发生变更
      新增入参:EipBindMode