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

Elastic Compute Service:ModifyInstanceNetworkSpec

最終更新日:Jun 24, 2026

ECS インスタンスの帯域幅構成を変更し、パブリック IP アドレスを割り当てる、またはネットワーク課金メソッドを変換します。スペックアップとスペックダウンの両方がサポートされています。

操作説明

  • サブスクリプション (PrePaid) インスタンスの帯域幅構成を変更する場合、アウトバウンドパブリック帯域幅 (InternetMaxBandwidthOut) が 0 Mbit/s から 0 以外の値にスペックアップされると、パブリック IP アドレスが自動的に割り当てられます。

  • 従量課金 (PostPaid) インスタンスの帯域幅構成を変更する場合、アウトバウンドパブリック帯域幅 (InternetMaxBandwidthOut) が 0 Mbit/s から 0 以外の値にスペックアップされても、パブリック IP アドレスは自動的に割り当てられません。パブリック IP アドレスを割り当てるには、AllocatePublicIp パラメーターを true に設定してください。

説明

単一リージョンにおいて、単一の Alibaba Cloud アカウントの帯域幅課金によるパブリック帯域幅の合計ピーク値には制限があります。詳細については、パブリック帯域幅の制限を参照してください。

  • 料金:

    • 帯域幅のスペックアップ後、デフォルトでは支払いが自動的に差し引かれます。支払方法に十分な残高があることを確認してください。残高が不足している場合、異常な注文が生成され、注文をキャンセルすることしかできません。アカウント残高が不足している場合は、AutoPay パラメーターを false にセットできます。この場合、通常の未払い注文が生成されます。ECS コンソールにログオンして注文の支払いを行うことができます。

    • 帯域幅のスペックダウン後、差額は元の支払方法に返金されます。使用済みのバウチャーは返金対象外です。

今すぐお試しください

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

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

ecs:ModifyInstanceNetworkSpec

update

*Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

  • ecs:AssociatePublicIpAddress
なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

InstanceId

string

必須

ネットワーク構成を変更するインスタンスの ID。

i-bp67acfmxazb4****

InternetMaxBandwidthOut

integer

任意

最大値のアウトバウンドパブリック帯域幅。単位: Mbit/s (メガビット/秒)。有効な値:

  • トラフィック課金: 0~100。

  • 帯域幅課金:

    • サブスクリプションインスタンス: 0~200。

    • 従量課金インスタンス: 0~100。

説明

インスタンスあたりのアウトバウンド帯域幅の最大値は、ECS インスタンスタイプのネットワーク帯域幅ベースライン/バースト可能 (Gbit/s) メトリックによっても制限されます。詳細については、インスタンスファミリーを参照してください。

10

InternetMaxBandwidthIn

integer

任意

最大値のインバウンドパブリック帯域幅。単位: Mbit/s (メガビット/秒)。有効な値:

  • 購入済みのアウトバウンドパブリック帯域幅の最大値が 10 Mbit/s 以下の場合: 1~10。デフォルト値: 10。

  • 購入済みのアウトバウンドパブリック帯域幅の最大値が 10 Mbit/s を超える場合: 1~InternetMaxBandwidthOut の値。デフォルト値: InternetMaxBandwidthOut の値。

10

ISP

string

任意

説明

このパラメーターは招待プレビュー中であり、まだ使用できません。

null

NetworkChargeType

string

任意

ネットワーク課金メソッドの変換先。有効な値:

  • PayByBandwidth: 帯域幅課金。

  • PayByTraffic: トラフィック課金。

説明

トラフィック課金モードでは、インバウンドおよびアウトバウンド帯域幅ピークはどちらも帯域幅の上限であり、確約されたサービスメトリックとして保証されるものではありません。リソース競合が発生した場合、帯域幅ピークが速度制限される場合があります。ビジネスで帯域幅の保証が必要な場合は、帯域幅課金モードを使用してください。

PayByTraffic

AllocatePublicIp

boolean

任意

パブリック IP アドレスを割り当てるかどうかを指定します。

  • true: パブリック IP アドレスを割り当てます。

  • false: パブリック IP アドレスを割り当てません。

デフォルト値: false。

false

StartTime

string

任意

一時的な帯域幅スペックアップの開始時刻。ISO 8601 標準の協定世界時 (UTC) で yyyy-MM-ddTHH:mmZ 初期化で指定します。時間は (mm) まで正確に指定する必要があります。

2017-12-05T22:40Z

EndTime

string

任意

一時的な帯域幅スペックアップの終了時刻。ISO 8601 標準の協定世界時 (UTC) で yyyy-MM-ddTHHZ 初期化で指定します。時間は (HH) まで正確に指定する必要があります。

説明

一時的な帯域幅スペックアップの終了時刻と開始時刻の間隔は 3 時間以上である必要があります。

2017-12-06T22Z

AutoPay

boolean

任意

自動支払いを有効にするかどうかを指定します。有効な値:

  • true: 帯域幅構成の変更後、支払いが自動的に差し引かれます。AutoPay パラメーターを true にセットする場合、アカウントに十分な残高があることを確認してください。アカウント残高が不足している場合、異常な注文が生成されます。ECS コンソールで注文の支払いを行うことはできません。注文をキャンセルすることしかできません。

  • false: 帯域幅構成の変更後、注文のみが生成され、支払いは行われません。支払方法の残高が不足している場合、AutoPay パラメーターを false にセットして自動支払いを無効にできます。この場合、API 呼び出しは通常の未払い注文を生成します。ECS コンソールにログオンして注文の支払いを行うことができます。

デフォルト値: true。

true

ClientToken

string

任意

リクエストのべき等性を確保するために使用されるクライアントトークン。クライアントを使用してトークンを生成できますが、異なるリクエスト間でトークンが一意であることを確認する必要があります。ClientToken の値には ASCII 文字のみを含めることができ、64 文字を超えることはできません。詳細については、べき等性の確保方法を参照してください。

123e4567-e89b-12d3-a456-426655440000

レスポンスフィールド

フィールド

説明

object

OrderId

string

注文 ID。このパラメーターは、サブスクリプション (PrePaid) インスタンスの帯域幅構成を変更した場合にのみ返されます。

123457890

RequestId

string

リクエスト ID

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

成功レスポンス

JSONJSON

{
  "OrderId": "123457890",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 InvalidInternetMaxBandwidthIn.ValueNotSupported The specified InternetMaxBandwidthIn is beyond the permitted range.
400 InvalidInternetMaxBandwidthOut.ValueNotSupported The specified InternetMaxBandwidthOut is beyond the permitted range.
400 OperationDenied Specified instance is in VPC.
400 InvalidParameter.Conflict %s
400 InvalidStartTime.ValueNotSupported The specified StartTime is out of the permitted range.
400 InvalidEndTime.ValueNotSupported The specified EndTime is out of the permitted range.
400 ChargeTypeViolation The operation is not permitted due to billing method of the instance.
400 Account.Arrearage Your account has an outstanding payment.
400 InvalidInternetChargeType.ValueNotSupported The specified InternetChargeType is invalid.
400 DecreasedBandwidthNotAllowed %s
400 BandwidthUpgradeDenied.EipBoundInstance The specified VPC instance has bound EIP, temporary bandwidth upgrade is denied.
400 InvalidClientToken.ValueNotSupported The ClientToken provided is invalid.
400 Throttling Request was denied due to request throttling, please try again after 5 minutes.
400 InvalidInstanceStatus.NotStopped The specified Instance status is not Stopped.
400 InvalidAction Specified action is not valid.
400 IpAllocationError Allocate public ip failed.
400 InvalidParam.AllocatePublicIp The specified param AllocatePublicIp is invalid.
400 InstanceDowngrade.QuotaExceed Quota of instance downgrade is exceed.
400 InvalidBandwidth.ValueNotSupported Instance upgrade bandwidth of temporary not allow less then existed.
400 InvalidInstanceStatus The specified instance status does not support this action.
400 InvalidInstance.UnPaidOrder Unpaid order exists in your account, please complete or cancel the payment in the expense center.
400 LastOrderProcessing The previous order is still processing, please try again later.
400 LastRequestProcessing The previous request is still processing, please try again later.
400 InvalidStartTime.BeyondLifeCycle The specified start time exceeds the expiration time.
400 InvalidEndTime.BeyondLifeCycle The specified end time exceeds the expiration time.
400 InvalidPayMethod.SyncPaymentNotSupport Synchronous payment is not supported. Use another payment method.
400 InvalidBandwidthOut.LessThanZero The bandwidth must be larger than 0 when specifying isp.
400 InvalidParameter.BandwidthBiggerThanBaseBandwidth %s
400 InvalidAction.WithActiveElasticUpgrade The instance has active Elastic Upgrade.
400 InvalidParameter.CloudboxNotSupported %s
400 InvalidParameter.Bandwidth %s
400 NoPermission.Price The operation requires price permission. Please either apply for permission from your main account, or set the parameter AutoPay as true.
400 NoPermission.Refund The operation requires refund permission. Please apply for permission from your main account.
400 InvalidParameter.DedicatedRegionNotSupported The specified action is rejected because the specified ECS instance in the dedicated region does not support public IP.
400 InvalidOperation.InstanceStatusUnsupported The specified instance status is not supported for this operation, expect status is Running or Stopped.
400 QuotaExceeded.InternetBandwidth %s.
400 UnsupportedIspNetworkChargeType The network charge type is not supported when specifying ISP.
400 IncorrectInstanceStatus Current instance status does not support this operation.
400 TaskConflict The operation is too frequent, please wait a moment and try again.
400 InvalidOperation.InternetMaxBandwidthOutUnsupported The InternetMaxBandwidthOut is not allowed to modify.
500 InternalError The request processing has failed due to some unknown error.
500 Image.OrderFailed Create marketplace image order failed.
403 IncorrectInstanceStatus The current status of the instance does not support this operation.
403 InstanceLockedForSecurity The specified operation is denied as your instance is locked for security reasons.
403 InstanceExpiredOrInArrears The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).
403 ChargeTypeViolation The operation is not permitted due to billing method of the instance.
403 OperationDenied The operation is denied due to the instance is PrePaid.
403 InvalidAccountStatus.NotEnoughBalance Your account does not have enough balance.
403 InvalidInstance.UnPaidOrder The specified Instance has unpaid order.
403 Throttling Request was denied due to request throttling, please try again after 5 minutes.
403 InvalidInstance.InstanceNotSupported The special vpc instance with eip not need bandwidth.
403 InstanceDowngrade.QuotaExceed Quota of instance downgrade is exceed.
403 InvalidInstanceStatus The current status of the instance does not support this operation.
403 InvalidOperation.StarterPackage StarterPackage not support modification.
403 NAT_PUBLIC_IP_BINDING_FAILED Binding nat public ip failed.
403 InvalidInstance.EipNotSupport The specified instance with eip is not supported, please unassociate eip first.
403 InvalidInstance.NatPortMapNotSupport The special instance with nat port map not support operate, please remove nat port map first.
403 OperationDenied.UnpaidOrder The specified instance has unpaid order.
403 Mayi.InternalError The request processing has failed due to some unknown error.
403 InvalidNetworkType.ValueNotSupported The specified parameter NetworkType is not valid.
403 OperationDenied.ImageNotValid The specified image is not authorized.
403 InvalidInstanceChargeType.ValueNotSupported The specified parameter ChargeType is not valid.
403 InvalidIspType.ValueNotSupported %s
403 UnsupportedIspChargeType %s
403 UnsupportedIspClassicNetwork %s
403 InvalidIspBandwidthOut %s
403 UnsupportedChangeIsp %s
403 InvalidIspUID %s
403 UnsupportedIspRegion %s
403 BandIncreaseNotSupportIsp %s
403 SecurityRisk.3DVerification We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email.
403 InvalidOperation.PublicIpAddressNoStock The public IP address for the specified Region or ChargeType of the instance is out of stock. Please try another Region or ChargeType.
403 InvalidOperation.NetworkTypeUnsupported The specified network type is not supported in this region.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist.
409 OperationConflict Request was denied due to conflict with a previous request,please try again later.

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

変更履歴

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