You need to enable JavaScript to run this app.
导航

ModifyNatGatewayAttributes

最近更新时间2024.04.18 19:17:38

首次发布时间2021.12.28 08:28:52

调用 ModifyNatGatewayAttributes 接口,修改NAT网关的规格、名称、描述。

调用说明

  • 当前账户未欠费,且有足够的余额支付后续NAT网关的费用。
  • 包年包月NAT网关只支持提升规格,不支持降低规格。
  • 以下可选参数如不配置,则保持原有配置。

调试

请求参数

参数名称
类型
是否必选
示例值
描述
ActionStringModifyNatGatewayAttributes要执行的操作,取值:ModifyNatGatewayAttributes。
VersionString2020-04-01API的版本信息,当前版本为:2020-04-01。

NatGatewayId

String

ngw-3tex2x1cwd4c6c0v****

NAT网关的ID。
您可以调用 DescribeNatGateways 接口,查询NAT网关的ID。

Spec

String

Medium

NAT网关的规格。取值如下:

  • Small:小型。
  • Medium:中型。
  • Large:大型。

NatGatewayName

String

nat-01

NAT网关的名称。

  • 长度限制为1 ~ 128个字符。
  • 需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。

Description

String

This is a nat

NAT网关的描述。

  • 长度限制为0~ 255个字符。
  • 需要以字母、中文或数字开头。可包含英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。)。

返回数据

参数名称
类型
示例值
描述
RequestIdString2021062415303301022514515207C4****请求ID。

请求示例

GET /?Action=ModifyNatGatewayAttributes&Version=2020-04-01&NatGatewayId=ngw-2fedgzyvtzaio59gp675l****&Spec=Small&NatGatewayName=nat-1 HTTP/1.1
Host: open.volcengineapi.com
Service: natgateway
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "2021062415303301022514515207C4****",
        "Action": "ModifyNatGatewayAttributes",
        "Version": "2020-04-01",
        "Service": "natgateway",
        "Region": "cn-beijing"
    },
    "Result":{
        "RequestId": "2021062415303301022514515207C4****"
    }
}

错误码

公共错误码,请参见 公共错误码 。

HttpCode
错误码
错误信息
描述
400InvalidNatGateway.InvalidBillingTypeThe specified NAT gateway is not in the correct billing type for the request.指定的NAT网关所处计费类型无法响应该请求。
400InvalidNatGateway.InvalidStatusThe specified NAT gateway is not in the correct status for the request.指定的NAT网关所处的状态无法响应该请求。
400InvalidNatGatewaySpec.MalformedThe specified NAT spec is malformed.指定的NAT网关规格不支持。
400UnsupportedOperationThe request on the specified instance is denied due to the account in arrears status.因账户处于欠费状态,对于该实例的操作请求被拒绝。
400UnsupportedOperationThe request on the specified instance is denied due to the account balance and available vouchers are less than 100 yuan in total.因账户余额及可用代金券共不足100元,对于该实例的操作请求被拒绝。
404InvalidNatGateway.NotFoundThe specified NAT gateway does not exist.指定的NAT网关不存在。
412InvalidNatGateway.ExpiredThe specified NAT gateway has expired.指定的NAT网关已到期。