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

Elastic Compute Service:RenewInstance

最終更新日:Sep 24, 2026

サブスクリプション Elastic Compute サービス (ECS) インスタンスを更新します。更新期間を指定するか、インスタンスを統一有効期限に更新できます。

操作説明

この操作を実行する前に、Elastic Compute サービスプロダクトの課金メソッドおよび料金を十分に理解していることをご確認ください。

  • アカウント残高または与信限度額が十分であることを確認してください。

  • サブスクリプションインスタンスのみサポートされています。従量課金インスタンスに対してこの操作を実行すると、エラーが返されます。

  • 更新期間パラメーター (Period および PeriodUnit) または統一有効期限パラメーター (ExpectedRenewDay) のいずれかを指定する必要があります。両方を指定することはできません。

今すぐお試しください

この 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:RenewInstance

update

*Instance。

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

なし なし

リクエストパラメーター

パラメーター

型

必須 / 任意

説明

例

ClientToken

string

任意

リクエストのべき等性を確保するために使用されるクライアントトークン。クライアントを使用してトークンを生成できますが、異なるリクエスト間でトークンが一意になるようにしてください。ClientToken の値には ASCII 文字のみを使用でき、長さは 64 文字以下です。詳細については、「べき等性を確保する方法」を参照してください。

0c593ea1-3bea-11e9-b96b-88e9fe637760

InstanceId

string

必須

更新するインスタンスの ID。

i-bp67acfmxazb4p****

Period

integer

任意

サブスクリプションインスタンスの更新期間。DedicatedHostId を指定する場合、Period の値は専用ホストの残りのサブスクリプション期間を超えることはできません。有効な値:

PeriodUnit が Month に設定されている場合、Period の有効な値は 1、2、3、4、5、6、7、8、9、12 です。

説明

更新期間パラメーター (Period および PeriodUnit) または統一有効期限パラメーター (ExpectedRenewDay) のいずれかを指定する必要があります。両方を指定することはできません。

1

PeriodUnit

string

任意

更新期間の単位。このパラメーターは Period パラメーターの単位を指定します。有効な値:

Month。

デフォルト値: Month。

Month

ExpectedRenewDay

integer

任意

インスタンスを統一有効期限に更新する日。有効な値: 1 ~ 28。

このパラメーターを使用するには、まず ECS インスタンスの統一有効期限を設定 する必要があります。このパラメーターの値は、設定した統一有効期限と一致している必要があります。一致していない場合、呼び出しは失敗します。

説明

更新期間パラメーター (Period および PeriodUnit) または統一有効期限パラメーター (ExpectedRenewDay) のいずれかを指定する必要があります。両方を指定することはできません。

5

レスポンスフィールド

フィールド

型

説明

例

object

OrderId

string

注文 ID。

1234567890

RequestId

string

リクエスト ID

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

例

成功レスポンス

JSONJSON

{
  "OrderId": "1234567890",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 InvalidInternetChargeType.ValueNotSupported The specified InternetChargeType is not valid. 指定されたネットワークの支払い方法は無効です。
400 InvalidInstanceType.NotSupported The specified InstanceType is not Supported.
400 InvalidParameter The specified parameter "InternetMaxBandwidthOut" is not valid.
400 InvalidInstanceChargeType.NotFound The InstanceChargeType does not exist in our records. 指定されたインスタンスの支払い方法が存在しません。
400 InvalidRebootTime.Malformed The specified RebootTime is not valid.
400 InvalidRebootTime.ValueNotSupported The specified RebootTime is out of the permitted range. 指定された再起動時刻は無効です。
400 IdempotenceParamNotMatch Request uses a client token in a previous request but is not identical to that request. リクエストパラメーターが、同じ ClientToken を持つリクエストと一致しません。
400 InvalidClientToken.ValueNotSupported The ClientToken provided is invalid. 指定された ClientToken は無効です。
400 InvalidInstanceType.ValueNotSupported The specified InstanceType does not exist or beyond the permitted range. 指定されたインスタンスタイプは利用可能な範囲外のため、無効です。
400 InvalidInstanceType.codeUnauthorized The specified InstanceType is not authorized. 指定された InstanceType は無効です。
400 InvalidInternetChargeType.InstanceNotSupported The specified instance which is in vpc is not support the parameter InternetChargeType. 指定されたインターネット課金タイプは、このインスタンスではサポートされていません。
400 InvalidPeriod The specified period is not valid. 指定された期間が無効です。
400 MissingParamter The specified parameter "Period" is not null. Period パラメーターは空にできません。
400 Upgrade.NotSupported Upgrade operation is not supported. アップグレード操作は無効です。
400 OperationDenied Specified instance is in VPC. 指定されたスナップショットでは、データボリュームの作成が許可されていません。
400 InvalidInstanceType.ValueUnauthorized The specified InstanceType is not authorized.
400 DependencyViolation.InstanceType Current instancetype cannot be changed to the specified one. 現在のインスタンスタイプを指定されたインスタンスタイプに変更できません。
400 InvalidPeriodUnit.ValueNotSupported The specified parameter PeriodUnit is not valid. パラメーター PeriodUnit は無効です。
400 InvalidDedicatedHostId.NotFound The specified DedicatedHostId does not exist. 指定された専用ホストが存在しません。
400 InvalidDedicatedHostStatus.NotSupport Operation denied due to dedicated host status. 現在の専用ホストのステータスでは、この操作はサポートされていません。
400 IncorrectDedicatedHostStatus The current status of the resource does not support this operation. 現在のリソースの状態では、この操作はサポートされていません。
400 InvalidPeriod.ExceededDedicatedHost Instance expired date can't exceed dedicated host expired date.
400 InvalidStatus.Upgrading The instance is upgrading; please try again later. インスタンスはスペックアップ中です。しばらくしてからもう一度お試しください。
400 InvalidPeriod.ExceededMaximumExpirationDate The specified renewal period cannot exceed the maximum expiration date. We recommend you try shortening the renewal period at next attempt. 指定された更新期間は、有効期間の最大値を超えることはできません。更新期間を短くして、再試行してください。
400 LastOrderProcessing The previous order is still processing, please try again later. 注文は処理中です。後でもう一度お試しください。
400 Idempotence.Processing The previous request is still processing, please try again later. リクエストは処理中です。しばらくしてからもう一度お試しください。
400 InvalidLoanOrderStatus.Uncompleted Any unpaid order must be cancelled before you try this action again. The scheduled unpaid order is a loan order that cannot be auto cancelled. For more information, visit the loan management center.
400 OperationDenied.UnfinishedOrder The current instance has unfinished refundOrder, this operation is denied. インスタンスに未処理の返金注文があります。しばらくしてからもう一度お試しください。
400 InvalidPeriod.NotFound The specified period and expectedRenewDay cannot both be empty.
400 InvalidExpectedRenewDay.StarterPackageNotSupported The specified starterPackage cannot support renew with expectedRenewDay.
400 InvalidParam.ExpectedRenewDay The specified param ExpectedRenewDay is not valid.
400 QuotaExceed.AlignInstance The maximum number of align operations is exceeded.
400 InvalidExpectedRenewDay.Conflict The specified expectedRenewDay is in conflict with period.
400 InvalidExpectedRenewDay.ValueNotSupported The specified parameter ExpectedRenewDay is not valid.
400 OperationDenied.AbnormalInstanceInfo The current renewable operation is not supported due to abnormal information of the instance, please submit ticket to process.
400 NoPermission.Price The operation requires price permission. Please either apply for permission from your main account, or set the parameter AutoPay as true. この操作には課金に関する権限が必要です。Alibaba Cloud アカウントに対して権限をリクエストするか、AutoPay パラメーターを true に設定して自動支払いを有効にしてください。
400 InvalidOperation.ClassicNetworkTypeNotSupported The classic network instance does not support this operation. クラシックネットワークベースのインスタンスは更新できなくなりました。通常の更新を行うには、事前にインスタンスを VPC に移行する必要があります。
500 InternalError The request processing has failed due to some unknown error.
403 ChargeTypeViolation The operation is not permitted due to charge type of the instance.
403 Diskcategory.Mismatch The disk specified to convert to portable is not allowed due to the disk category does not support. 指定されたディスクは、ディスクタイプの制限によりデタッチ可能なディスクに変換できません。ディスクをデタッチできません。
403 IncorrectInstanceStatus The current status of the resource does not support this operation.
403 InstanceSpecModification.NotEffective The specified instance has been reserved for making a spec modification and not taken effective in the current contract period. 指定されたインスタンスは仕様変更のために予約されているため、現在の契約期間中は効果がありません。
403 LastTokenProcessing The last token request is processing.
403 Instance.UnPaidOrder The specified instance has unpaid order.
403 InstanceLockedForSecurity The specified operation is denied as your instance is locked for security reasons. ディスクがアタッチされているインスタンスは、セキュリティ上の理由によりロック済みです。
403 InvalidDisk.NotAllowed The specified disk is not allowed to be converted to portable.
403 InstanceTypeNotSupported The specified zone does not offer the specified instancetype.
403 InvalidChargeType.NotSupported The chargeType of the instance does not support this operation. この課金タイプのインスタンスでは、この操作はサポートされていません。
403 OperationDenied.NoStock The requested resource is sold out in the specified zone, try other types of resources or other regions and zones. 指定されたディスクカテゴリが指定されたゾーンまたはクラスターに存在しないか、あるいは指定されたゾーンがクラスターと一致しません。
403 OperationDenied.ImageNotValid The specified marketplace image is not authorized. Please verify the marketplace image authorization and try again.
403 InvalidPeriod.StarterPackage This instance was created by using a Starter Package plan and can only be renewed monthly, not yearly. エントリーレベルパッケージプロモーションの対象インスタンスは、月額自動更新のみ設定できます。
403 RenewDateNotSupported.StarterPackage This instance was created by using a Starter Package plan and can only be renewed three days before it expires.
403 PrePaidInstance.Expired The prePaid instance has expired. サブスクリプションインスタンスの有効期限が切れています。
403 Forbidden.RiskControl This operation is forbidden by Aliyun RiskControl system. リスクガバナンスシステムにより、この操作は禁止されています。
404 InvalidDiskId.NotFound The specified disk does not exist. 指定されたディスクが存在しません。ディスク ID が正しいかどうかを確認してください。
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. 指定されたインスタンスが存在しません。インスタンス ID が正しいかどうかを確認してください。

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

変更履歴

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