すべてのプロダクト
Search
ドキュメントセンター

NAT Gateway:ModifyNatGatewayAttribute

最終更新日:Apr 27, 2026

NAT ゲートウェイの名前と説明を変更します。

操作説明

概要

この操作を呼び出すことで、インターネット NAT ゲートウェイまたは VPC NAT ゲートウェイを照会できます。本ドキュメントで「NAT ゲートウェイ」と記載されている場合は、両方の NAT ゲートウェイタイプを指します。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

この操作の認証情報はありません。問題が発生した場合は、アカウントマネージャーにご連絡ください。

リクエストパラメーター

パラメーター

必須 / 任意

説明

RegionId

string

必須

NAT ゲートウェイが配置されているリージョン ID です。

最新のリージョンリストを照会するには、DescribeRegions 操作を呼び出してください。

cn-hangzhou

NatGatewayId

string

必須

NAT ゲートウェイの ID です。

ngw-2ze0dcn4mq31qx2jc****

Name

string

任意

NAT ゲートウェイの名前です。

名前は 1~128 文字で指定し、http:// または https:// で開始することはできません。

nat123

Description

string

任意

NAT ゲートウェイの説明です。

説明は 1~128 文字で指定し、http:// または https:// で開始することはできません。

Description

IcmpReplyEnabled

boolean

任意

インターネット制御通知プロトコル (ICMP) 非取得機能を有効にするかどうかを指定します。有効値は以下のとおりです。

  • false(デフォルト)

  • true

true

EipBindMode

string

任意

EIP の NAT ゲートウェイへの関連付けモードを変更します。値は空または NAT(一般モード)を指定できます。

説明
  • MULTI_BINDED から NAT への変更のみ可能です。NAT から MULTI_BINDED への変更はできません。MULTI_BINDED モードの詳細については、「CreateNatGateway」をご参照ください。

  • 関連付けモードを変更すると、数秒間ネットワークが中断される可能性があります。中断時間は EIP の数に比例して長くなります。一度に変更できる EIP の上限は 5 個です。オフピーク時間帯に変更することを推奨します。

  • 関連付けモードを NAT に変更後、インターネット NAT ゲートウェイは IPv4 ゲートウェイと互換性を持つようになります。NAT モードで EIP を NAT ゲートウェイに関連付ける場合、その EIP は NAT ゲートウェイが属する vSwitch のプライベート IP アドレスを 1 つ消費します。vSwitch に十分なプライベート IP アドレスが確保されていることを確認してください。

NAT

EnableSessionLog

boolean

任意

セッションログを有効にするかどうかを指定します。有効値は以下のとおりです。

  • true:セッションログが有効になります。

  • false:セッションログが無効になります。

true

LogDelivery

object

任意

セッションログの構成情報です。

LogDeliveryType

string

任意

セッションログの書き込みタイプです。値:sls(Alibaba Cloud Log Service SLS)。

sls

LogDestination

string

任意

セッションログの書き込み先アドレスです。値:acs:log:${regionName}:${projectOwnerAliUid}:project/${projectName}/logstore/${logstoreName}

acs:log:cn-hangzhou:0000:project/nat_session_log_project/logstore/session_log_test

レスポンスフィールド

フィールド

説明

object

リクエスト ID です。

RequestId

string

リクエスト ID です。

AB5F62CF-2B60-4458-A756-42C9DFE108D1

成功レスポンス

JSONJSON

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

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 UnsupportedFeature.PrivateLinkMode The feature of %s is not supported.
400 IncorrectStatus.NATGW NATGW status is invalid.
400 ExclusiveParam.%sAnd%s The param of %s and %s are mutually exclusive.
400 IncorrectStatus.NatGateway The status of natgateway is incorrect.
400 DependencyViolation.PrivateLinkMode The specified resource of %s depends on %s, so the operation cannot be completed.
400 UnsupportedFeature.IcmpReplyEnabled The feature of IcmpReplyEnabled is not supported.
400 InvalidParams.NotNull The parameter must not be null, name or description or icmpReplyEnabled
400 InvalidParameter.Name.Malformed The specified Name is not valid.
400 InvalidParameter.Description.Malformed The specified Description is not valid.
400 UnsupportedFeature.IndirectConvertForVpcNat The VPC NAT gateway is not support to change EIP bond type.
400 UnsupportedFeature.NormalNatModifyEipBindMode The normal NAT gateway is not support to change EIP bond type.
400 OperationDenied.EipBondTypeIsAlreadyNAT The EIP bond type is already NAT type.
400 UnsupportedFeature.IndirectConvertForFwNat The security protection enabled NAT gateway is not support change EIP bond type.
400 QuotaExceeded.EipNumForModifyEipBondType The quota of %s is exceeded, binded: %s, quota: %s.
400 ResourceNotEnough.SwitchAvailableIps The available private Ip number is not enough in your subnet.
400 UnsupportedFeature.VpcNatSecurityProtectionEnabled The VPC NAT gateway is not supported to enable security protection.
400 OperationDenied.NatGatewayStatusInvalid The NAT gateway status is invalid.
400 OperationDenied.EipStatusInvalid The NAT gateway has EIP in invalid status.
400 OperationDenied.SnatEntryStatusInvalid The NAT gateway has SNAT entry in invalid status.
400 OperationDenied.DnatEntryStatusInvalid The NAT gateway has DNAT entry in invalid status.
400 UnsupportedFeature.MutilBindedTypeNatEnableFw The NAT with Mutil-Binded Eip bind type is not support enable firewall.
400 Forbidden.FinancialLocked The instance is locked due to outstanding payments.
400 OperationFailed.PrivateLinkMode The NAT gateway is not support to change PrivateLinkMode.
400 IllegalParam.SessionLogDeliveryDestination The specified Delivery Destination is illegal.
400 OperationFailed.LogDeliveryIsUnAuthorized Operation failed because the user is not authorized to deliver NAT session log.
400 IllegalParam.SessionLogDeliveryType The specified Delivery Type is illegal.
400 UnsupportedFeature.EnableSessionLog The feature of EnableSessionLog is not supported.
500 OperationFailed.ConfigSessionLog Failed to configure session log due to a temporary failure of the server.
403 Forbidden.ModifyEipBondType Authentication is failed for modify EIP bond type.
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records.
404 InvalidNatGatewayId.NotFound The specified NatGatewayId does not exist in our records.

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。