システムディスクを置き換えることで、ECS インスタンスのオペレーティングシステムを置き換えます。置き換え後、システムディスクのディスク ID が変更され、元のディスクはリリースされます。
操作説明
この操作を呼び出す前に、「システムディスクの置き換え(オペレーティングシステムの変更)」をお読みください。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ecs:ReplaceSystemDisk |
update |
Disk。
Image。
*Instance。
|
|
なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| InstanceId |
string |
必須 |
ターゲットインスタンスの ID。 |
i-bp67acfmxazb4ph**** |
| ImageId |
string |
任意 |
システムをリセットするために使用するイメージの ID。このパラメーターは必須です。 |
m-bp67acfmxazb4ph**** |
| SystemDisk.Size |
integer |
任意 |
新しいシステムディスクの容量。単位: GiB。有効な値: |
80 |
| ClientToken |
string |
任意 |
リクエストのべき等性を確保するために使用されるクライアントトークン。クライアントを使用してトークンを生成できますが、異なるリクエスト間でトークンが一意であることを確認してください。ClientToken の値には ASCII 文字のみを含めることができ、長さは 64 文字を超えることはできません。詳細については、「べき等性を確保する方法」をご参照ください。 |
123e4567-e89b-12d3-a456-426655440000 |
| UseAdditionalService |
boolean |
任意 |
Alibaba Cloud が提供する仮想マシンのシステム構成を使用するかどうかを指定します (Windows: NTP および KMS。Linux: NTP および YUM)。 |
true |
| Password |
string |
任意 |
ECS インスタンスのユーザー名とパスワードをリセットするかどうかを指定します。パスワードの長さは 8~30 文字で、大文字、小文字、数字、特殊文字のうち少なくとも 3 種類を含む必要があります。サポートされている特殊文字は以下の通りです。 |
EcsV587! |
| PasswordInherit |
boolean |
任意 |
イメージのプリセットパスワードを使用するかどうかを指定します。 |
false |
| KeyPairName |
string |
任意 |
キーペアの名前。 |
testKeyPairName |
| DiskId |
string |
任意 |
説明
[非推奨] このパラメーターは非推奨です。互換性を向上させるため、代わりに |
d-bp67acfmxazb4ph**** |
| Platform |
string |
任意 |
説明
このパラメーターは非推奨です。 |
CentOS |
| Architecture |
string |
任意 |
説明
このパラメーターは非推奨です。 |
i386 |
| SecurityEnhancementStrategy |
string |
任意 |
システムディスクの置き換え後に無料のセキュリティセンターサービスを使用するかどうかを指定します。有効な値: |
Active |
| Encrypted |
boolean |
任意 |
ディスクを暗号化するかどうかを指定します。有効な値: |
false |
| KMSKeyId |
string |
任意 |
システムディスクの KMS キー ID。 |
e522b26d-abf6-4e0d-b5da-04b7******3c |
| EncryptAlgorithm |
string |
任意 |
説明
このパラメーターは一般公開されていません。 |
hide |
| Arn |
array<object> |
任意 |
このパラメーターは一般公開されていません。 |
|
|
object |
任意 |
|||
| RoleType |
string |
任意 |
説明
このパラメーターは一般公開されていません。 |
null |
| Rolearn |
string |
任意 |
説明
このパラメーターは一般公開されていません。 |
null |
| AssumeRoleFor |
integer |
任意 |
説明
このパラメーターは一般公開されていません。 |
0 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| DiskId |
string |
新しいシステムディスクのディスク ID。 |
d-bp67acfmxazb4ph**** |
| RequestId |
string |
リクエスト ID |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
例
成功レスポンス
JSONJSON
{
"DiskId": "d-bp67acfmxazb4ph****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | LoginAsNonRoot.ImageNotSupport | The specified image does not support login as non-root. | このイメージは非ルートログインをサポートしていません。 |
| 400 | InvalidSystemDiskSize.ValueNotSupported | The specified parameter SystemDisk.Size is invalid. | |
| 400 | InvalidParameter.Conflict | The specified image does not support the specified instance type. | 現在の操作では、ディスクId と イメージId を同時に指定することはできません。ディスクId または イメージId のいずれかが空でないことを確認してください。 |
| 400 | InvalidSystemDiskSize.ImageNotSupportResize | The specified image does not support resize. | イメージが指定されたシステムディスクサイズをサポートしていません。 |
| 400 | InvalidSystemDiskSize | The specified parameter SystemDisk.Size is invalid. | |
| 400 | InvalidPassword.Malformed | The specified parameter "Password" is not valid. | 指定された Password パラメーターが無効です。 |
| 400 | InvalidPasswordParam.Mismatch | The input password should be null when passwdInherit is true. | PasswdInherit が有効な場合、ユーザー名とパスワードは空に設定する必要があります。 |
| 400 | OperationDenied | The specified image contains the snapshot of the data disk. This operation is not supported. | |
| 400 | InvalidDiskCategory.ValueNotSupported | The specified parameter "DiskCategory" is not valid. | 指定されたリソースのディスクタイプはこの操作をサポートしていません。 |
| 400 | InvalidKeyPairName.NotFound | The specified KeyPairName does not exist. | キーペアが存在しません。 |
| 400 | DependencyViolation.IoOptimize | The specified parameter InstanceId is not valid. | 指定されたインスタンスの I/O 最適化構成が無効です。 |
| 400 | MissingParameter.Architecture | Architecture should not be null. | Architecture パラメーターを空にすることはできません。 |
| 400 | InvalidArchitecture.Malformed | Architecture is not valid. | 指定された Architecture パラメーターが無効です。このパラメーターのフォーマットが正しいかどうかを確認してください。 |
| 400 | MissingParameter.Platform | Platform should not be null. | パラメーター Platform フォームは空にできません。 |
| 400 | InvalidPlatform.Malformed | Platform is not valid. | 指定されたプラットフォームが無効です。 |
| 400 | InvalidDiskId.NotFound | The specified disk do not exist. | 指定されたディスクが存在しません。 |
| 400 | InvalidDatadisk.DiskStatusViolation | The operation is not permitted due to status of the Datadisk. | データディスクの現在のステータスでは、この操作はサポートされていません。 |
| 400 | InvalidDatadisk.DiskCategoryViolation | The operation is not permitted due to category of the Datadisk. | データディスクタイプはこの操作をサポートしていません。 |
| 400 | InvalidDatadisk.ChargeTypeViolation | The operation is not permitted due to charge type of the Datadisk. | |
| 400 | MissingParameter | The input parameter "ImageId" that is mandatory for processing this request is not supplied. | |
| 400 | InvalidInstance.NotFoundSystemDisk | The specified instance has no system disk. | インスタンスのシステムディスクが見つかりません。 |
| 400 | InvalidParameter.DiskType | The specified disk type which has kms key can't convert to system disk. | |
| 400 | DISK_IN_DEDICATED_BLOCK_STORAGE_CLUSTER | The disk in dedicated block storage cluster is not allowed to do this operation. | |
| 400 | IncorrectDiskStatus.ReplicationStatusNotFound | Disk replication status not found. | |
| 400 | IncorrectDiskStatus.InReplication | Disk already in replication. | |
| 400 | InvalidInstanceType.NotSupported | The specified instanceType is not supported by the image architecture. | 指定されたイメージアーキテクチャはこのインスタンスタイプをサポートしていません。 |
| 400 | InvalidRegionId.NotSupportReplaceEncryptedSystemDisk | The specified region not support replace encrypted system disk. | |
| 400 | InvalidStorageClusterId.CapacityNotEnough | The remaining capacity of the current dedicated storage cluster is less than the size of disk. | ディスクが属する専用ブロックストレージクラスターに十分な空き容量がありません。 |
| 400 | QuotaExceed.DiskCapacity | The used capacity of disk type has exceeded the quota in the zone, %s. | 指定されたディスクタイプの使用容量がアクティブなゾーンのクォータ制限を超えました。クォータセンターでディスク容量クォータのクエリおよび引き上げリクエストを行えます。 |
| 400 | AccountForbidden.ProductCreationLimited | The commodity must be officially operated by Aliyun and in pay-as-you-go billing method. | エンタープライズクラウド移行のお客様は、従量課金制 ECS インスタンスのみを購入でき、Alibaba Cloud マーケットプレイスが提供するイメージなどのサードパーティプロダクトは購入できません。パラメーターを確認し、有効なパラメーターでリトライしてください。 |
| 400 | InternalError | The requested services is not available now. Please try again later. | リクエストの送信中にエラーが発生しました。後でもう一度お試しください。 |
| 400 | InvalidDiskName.Malformed | The specified parameter "SyatemDisk.DiskName or DataDisk.n.DiskName" is not valid. | DiskName パラメーターで指定されたディスク名が無効です。 |
| 400 | InvalidParameter.Encrypted | Creating non-encrypted disks with encrypted snapshots is not supported. | 暗号化されたスナップショットから非暗号化ディスクを作成することはサポートされていません。 |
| 500 | OperationDenied | Internal Error. | |
| 500 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. | |
| 403 | LoginAsNonRoot.RegionNotSupport | The specified region does not support login as non-root. | |
| 403 | InvalidSystemDiskStatus.IsTransfering | The current status of the resource does not support this operation. The system disk is transferring. | |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. | |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | InstanceLockedForSecurity | The instance is locked due to security. | インスタンスはセキュリティ上の理由によりロック済みです。セキュリティテクニカルサポートにお問い合わせください。 |
| 403 | ImageNotSubscribed | The specified image has not be subscribed. | |
| 403 | ImageRemovedInMarket | The specified marketplace image is not available. Or the specified user-defined image includes a product code because it is based on an image subscribed from the marketplace; and that marketplace image including the exact same product code has been removed. | |
| 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 charge type of the instance. | |
| 403 | DiskCreatingSnapshot | The operation is denied due to a snapshot of the specified disk is not completed yet. | |
| 403 | IoOptimized.NotSupported | The specified image does not support IoOptimized instances. | |
| 403 | ImageNotSupportInstanceType | The specified image don not support the InstanceType instance. | |
| 403 | QuotaExceed.BuyImage | The specified image is from the image market. You have not bought it or your quota has been exceeded. | |
| 403 | INST_HAS_UNPAID_ORDER | The instance has unpaid order. | |
| 403 | OperationDenied.InstanceCreating | The specified instance is creating. | |
| 403 | DependencyViolation.WindowsInstance | The instance runs Windows and does not support SSH key pair login. | |
| 403 | InvalidParameter.NotMatch | %s | 指定されたインスタンスタイプは特定のイメージのみをサポートしています。利用可能なイメージをクエリするには、DescribeImages 操作を呼び出してください。 |
| 403 | ResourcesNotInSameZone | The specified instance and disk are not in the same zone. | |
| 403 | OperationDenied.UnpaidOrder | The specified instance has unpaid order. | 指定されたインスタンス ID に未払いの注文があります。ECS コンソールにログインして支払いを完了できます。 |
| 403 | InvalidHostname.MismatchImage | The hostname of the current instance can not be applied to the image you choose. | |
| 403 | HibernationConfigured.InstanceOperationForbidden | The operation is not permitted due to limit of the hibernation configured instance. | インスタンスが休止状態オプションの有効化要件を満たしていないため、この操作は許可されていません。 |
| 403 | InvalidOperation.MultiAttachDisk | Multi attach disk does not support this operation. | マルチアタッチ機能が有効なディスクでは、この操作はサポートされていません。 |
| 403 | InvalidRegionId.NotSupportEncryptAlgorithm | The current region does not support creating encrypted disks with EncryptAlgorithm. | |
| 403 | InvalidRegionId.NotExists | The region not exists. | |
| 403 | InvalidEncryptAlgorithm | The specified parameter EncryptAlgorithm is not valid. | |
| 403 | InvalidEncrypted.NotMatchKmsKeyId | The specified parameter Encrypted must be true when KmsKeyId is not empty. | |
| 403 | InvalidEncrypted.NotMatchEncryptAlgorithm | The specified parameter Encrypted must be true when EncryptAlgorithm is not empty. | |
| 403 | InvalidParameter.KmsNotEnabled | The specified operation need enable KMS. | |
| 403 | InvalidParameter.DataEncryptedKeyCreateFailed | Failed to create the KMS data encryption key. Please verify that the current KMS key has authorized the ECS service to use it. If the issue persists; contact KMS Technical Support. | |
| 403 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service does not have permission to access your KMS key. Please verify that the specified KMS key has authorized the ECS service. | |
| 403 | InvalidKMSKeyId.NotSymmetric | The specified parameter KmsKeyId must be symmetric. | |
| 403 | InvalidDiskId.NotSupportReplaceEncryptedSystemDisk | The specified diskId not support replace encrypted system disk. | |
| 403 | NotSupportSnapshotEncrypted.DiskCategory | The specified disk category does not support creating encrypted system disks or encrypted data disks from snapshots. Check the DiskCategory or Encrypted parameter; or check your account for default encryption settings. | |
| 403 | InvalidParameter.AllEmpty | The current operation does not allow both diskId and imageId to be empty. Make sure that either diskId or imageId is not empty. | この操作では password と keyPairName の両方を空にすることはできません。password または keyPairName の少なくとも一方が指定されていることを確認してください。 |
| 403 | InvalidParameter.Conflict | The current operation does not allow both diskId and imageId to be set. Make sure that either diskId or imageId is not empty. | 現在の操作では、ディスクId と イメージId を同時に指定することはできません。ディスクId または イメージId のいずれかが空でないことを確認してください。 |
| 403 | OperationDenied | The current region does not support changing the image type. | 指定された EIP は利用できないか、権限が付与されていません。 |
| 403 | OperationDenied.ImageNotValid | The specified Image is disabled or deleted. Please check the status of the image. | |
| 403 | OperationDenied.DiskNoStock | The requested disk category is sold out in the specified zone. Please try a different disk category or another zone. | 指定されたゾーンでは、リクエストされたディスクタイプが売り切れています。別のディスクタイプを使用するか、別のゾーンをお試しください。 |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK (Customer Master Key) must be in an active state. | カスタマーマスターキー (CMK) はアクティブな状態である必要があります。 |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK(Customer Master Key) lacks authorization to add tags to the ECS service. | ECS に CMK を暗号化または復号する権限がありません。 |
| 403 | InvalidEncrypted.NotMatchSnapshot | The specified parameter Encrypted must be set to true when creating disks with encrypted snapshots. | 暗号化されたスナップショットからディスクを作成する場合、Encrypted パラメーターを true に設定する必要があります。 |
| 403 | InvalidEncrypted.NotMatchDiskDefaultEncryption | Enabling disk default encryption prevents the creation of non-encrypted disks. | アカウントレベルのデフォルトディスク暗号化が有効になっている場合、暗号化されていないディスクを作成することはできません。エラーが発生しました。 |
| 403 | InvalidPayMethod.SyncPaymentNotSupport | Synchronous payment is not supported. Use another payment method. | 同期支払いはサポートされていません。別の支払い方法を選択してください。 |
| 403 | InvalidOperation.ImageSecureBootUnsupported | The image does not support secure boot. | イメージは Secure Boot をサポートしていません。 |
| 403 | InvalidDiskCategory.NotSupported | The disk category is not supported in the current zone. Please call DescribeAvailableResource to check supported categories. | |
| 403 | OperationDenied.KMSKeyUnauthorized | The operation is denied due to missing KMS key authorization. Please check the KMS key permissions and ensure the key is properly authorized for this operation. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | 指定されたインスタンス ID が無効です。 |
| 404 | InvalidImageId.NotFound | The specified ImageId does not exist. | 指定されたイメージが見つかりませんでした。イメージが現在のリージョンに存在し、利用可能な状態であることを確認してください。 |
| 404 | InvalidSystemDiskSize.MoreThanMaxSize | The specified SystemDisk.Size parameter exceeds the maximum size. | |
| 404 | InvalidSystemDiskSize.LessThanImageSize | The specified parameter SystemDisk.Size is less than the image size. | |
| 404 | InvalidSystemDiskSize.LessThanMinSize | The specified parameter SystemDisk.Size is less than the min size. | |
| 404 | NoSuchResource | The specified resource is not found. | 指定されたリソースが存在しません。 |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。