ECS インスタンスにデータディスクまたはシステムディスクをアタッチします。
操作説明
この操作の呼び出し時は、以下の点に注意してください。
-
インスタンスとディスクは同じゾーンにある必要があります。
-
ディスクは Available (
Available) 状態である必要があります。 -
データディスクをアタッチする場合:
送信先の ECS インスタンスは Running (
Running) または Stopped (Stopped) 状態である必要があります。ディスクを個別に購入した場合、支払い方法は従量課金である必要があります。
ECS インスタンスからアンインストールされたシステムディスクは、支払い方法の制限なくデータディスクとしてアタッチできます。
デタッチされたエラスティック一時ディスクは、元のインスタンスにのみ再アタッチできます。
-
システムディスクをアタッチする場合:
送信先の ECS インスタンスは、システムディスクがデタッチされた元のインスタンスである必要があります。
送信先の ECS インスタンスは Stopped (
Stopped) 状態である必要があります。インスタンスのログイン認証情報を構成する必要があります。
エラスティック一時ディスクはシステムディスクとしてアタッチできません。
システムディスクのアタッチの詳細については、「システムディスクのデタッチまたはアタッチ」を参照してください。
-
ECS インスタンス情報をクエリする際、応答に
{"OperationLocks": {"LockReason" : "security"}}が含まれている場合、そのインスタンスに対するすべての操作が禁止されます。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ecs:AttachDisk |
update |
*Disk。
*Instance。
|
|
なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| InstanceId |
string |
必須 |
ディスクをアタッチする ECS インスタンスの ID。 |
i-bp1dq5lozx5f4pmd**** |
| DiskId |
string |
必須 |
アタッチするディスクの ID。ディスク ( 説明
データディスクとシステムディスクの両方をアタッチできます。関連する制約事項については、上記の操作の説明セクションを参照してください。 |
d-bp1j4l5axzdy6ftk**** |
| Device |
string |
任意 |
ディスクのデバイス名。 説明
このパラメーターはまもなく非推奨になります。互換性を向上させるため、ディスクを識別するには他のパラメーターを使用してください。 |
testDeviceName |
| DeleteWithInstance |
boolean |
任意 |
インスタンスのリリース時にディスクをリリースするかどうかを指定します。有効な値:
デフォルト値: false。 このパラメーターをセットする際は、以下の点に注意してください。
|
false |
| Bootable |
boolean |
任意 |
ディスクをシステムディスクとしてアタッチするかどうかを指定します。有効な値:
デフォルト値: false。 説明
|
false |
| Password |
string |
任意 |
システムディスクをアタッチする際にインスタンスにセットされるパスワード。パスワードは管理者およびルートユーザー名にのみ適用され、他のユーザー名には適用されません。パスワードの長さは 8~30 文字で、大文字、小文字、数字、特殊文字のうち少なくとも 3 種類を含む必要があります。サポートされている特殊文字は以下のとおりです。
Windows インスタンスの場合、パスワードの先頭を転送スラッシュ (/) にすることはできません。 説明
|
EcsV587! |
| KeyPairName |
string |
任意 |
システムディスクをアタッチする際に Linux ECS インスタンスにバインドする SSH キーペアの名前。
|
KeyPairTestName |
| Force |
boolean |
任意 |
ディスクを強制的にアタッチするかどうかを指定します。有効な値:
デフォルト値: false。 説明
現在、このパラメーターを true に設定できるのはリージョン ESSD (cloud_regional_disk_auto) のみです。 |
false |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
例
成功レスポンス
JSONJSON
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidDevice.Malformed | The specified device is not valid. | |
| 400 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | 現在のインスタンスステータスでは、この操作はサポートされていません。 |
| 400 | InvalidParameter | The input parameter is mandatory for processing this request is empty. | 現在のリクエストパラメーターが無効です。もう一度お試しください。 |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 400 | InvalidOperation.InstanceTypeNotSupport | The instance type of the specified instance does not support hot attach disk. | ディスクがアタッチされているインスタンスは、ディスクのホットスワップをサポートしていません。 |
| 400 | DiskCategory.OperationNotSupported | The operation is not supported to the specified disk due to its disk category. | 現在のディスクタイプはこの操作をサポートしていません。 |
| 400 | InvalidDisk.DiskNotBootable | The specified disk is not a bootable disk. It cannot be attached as a system disk. | |
| 400 | InvalidInstance.NotOriginInstance | The specified disk can not attached to other instance as system disk. | |
| 400 | InvalidParameterForce.DiskCategoryNotSupported | The specified disk category does not support force attach operation. | 指定されたディスクタイプは強制アタッチ操作をサポートしていません。 |
| 400 | InvalidParameterForce.PrepaidDiskNotSupported | The prepaid disk does not support force attach operation. | サブスクリプションディスクは強制アタッチ操作をサポートしていません。 |
| 400 | InvalidParameterForce.MultiAttachDiskNotSupported | The multi attach disk does not support force attach operation. | マルチアタッチディスクは強制アタッチ操作をサポートしていません。 |
| 400 | InvalidParameterForce.RegionNotSupported | The specified region does not support force attach operation. | 指定されたリージョンは強制アタッチ操作をサポートしていません。 |
| 400 | OperationConflict.DisksAttachingParallellyExceed | The number of disks attaching parallelly exceeds the limit. | 並列でアタッチされたディスクの数が上限を超えています。 |
| 400 | InvalidInstanceType.NotSupported | The specified instanceType is not supported by the image architecture. | 指定された InstanceType はサポートされていません。 |
| 400 | InvalidOperation.EncryptedDiskUnsupported | The specified encrypted disk is not supported for this operation. | |
| 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 | InstanceDiskLimitExceeded | The number of disks attached to the instance has exceeded the limit. | |
| 403 | InvalidDevice.InUse | The specified device has been occupied. | |
| 403 | DiskNotPortable | The specified disk is not a portable disk. | |
| 403 | InstanceLockedForSecurity | The instance is locked due to security. | ディスクがアタッチされているインスタンスは、セキュリティ上の理由によりロック済みです。 |
| 403 | ResourcesNotInSameZone | The specified instance and disk are not in the same zone. | |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | DiskInArrears | The specified operation is denied because the disk has overdue payments. Please settle the outstanding balance. | |
| 403 | DiskError | IncorrectDiskStatus. | |
| 403 | DiskId.ValueNotSupported | The specified parameter diskid is not supported. | 指定されたブロックストレージタイプではこの操作はサポートされていません。 |
| 403 | DiskId.StatusNotSupported | The specified disk status is not supported. | 現在のディスクの状態では、この操作はサポートされていません。 |
| 403 | IncorrectInstanceStatus.NotSupportESSD | The operation is not supported in this status. Please reboot the instance. | |
| 403 | IncorrectDiskStatus | The operation is not supported in this status. | 現在のディスクではこの操作はサポートされていません。ディスクが正常に使用されており、支払い遅延がないことを確認してください。 |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | ユーザーは共有ブロックストレージのホワイトリストに含まれていません。ホワイトリストへの登録を申請するには、チケットを起票してください。 |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK has not authorized the ECS service to perform the KMS TagResource and UntagResource operations. Please verify the authorization and try again. | |
| 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 | DependencyViolation.WindowsInstance | The instance image is Windows. SSH key pair login is not supported. | |
| 403 | InvalidInstanceType.NotSupportDiskCategory | The instanceType of the specified instance does not support this disk category. | 指定されたインスタンスタイプ (InstanceType) が現在のインスタンスのディスクカテゴリをサポートしていません。別のインスタンスタイプを試してください。各インスタンスタイプでサポートされるディスクタイプについては、インスタンスファミリーのドキュメントを参照してください。 |
| 403 | InvalidInstanceType.NotSupportPL0 | The instanceType of the specified instance does not support PL0 of cloud_essd. | |
| 403 | InvalidInstanceType.NvmeRequired | The instanceType of the specified instance requires nvme protocol. | 指定されたインスタンスタイプには NVMe プロトコルが必要です。 |
| 403 | InvalidInstanceType.NvmeUnsupported | The instanceType of the specified instance does not support nvme protocol. | 指定されたインスタンスタイプは NVMe プロトコルをサポートしていません。 |
| 403 | InvalidInstanceType.NotSupportMultiAttachDisk | The instanceType of the specified instance does not support multi attach disk. | 指定されたインスタンスタイプは、マルチアタッチが有効なディスクのアタッチをサポートしていません。 |
| 403 | DiskAttachedNumberExceeded | The attaching times of the specified disk exceeded. | 指定されたディスクがアタッチされているインスタンスの数が上限に達しました。 |
| 403 | InvalidOperation.CanNotAttachMultiAttachDiskAsSystemDisk | Multi attach disk can not be attached as system disk. | マルチアタッチが有効なディスクをシステムディスクとして使用することはできません。 |
| 403 | DeleteWithInstance.Conflict | Multi attach disk cannot be set to DeleteWithInstance attribute. | 指定されたディスクはリムーバブルディスクではないため、インスタンスと一緒にリリースすることはできません。 |
| 403 | InvalidParameter.DeleteWithInstance | The DeleteWithInstance for the elastic ephemeral disk must be set to true. | エラスティック一時ディスクの DeleteWithInstance プロパティは true に削除する必要があります。 |
| 403 | InvalidOperation.OtherInstanceUnsupported | The elastic ephemeral disk can only be attached to the instance it was last mounted on. Please check the disk system tag to get the last associated instance. | |
| 403 | InvalidInstance.ZoneConflict | The force attach operation is not supported when both the current and target instances are in the same zone. | 強制アタッチを実行するには、現在のインスタンスとターゲットインスタンスが異なるゾーンに存在する必要があります。 |
| 403 | InvalidParameter.AllEmpty | The current operation requires either a password or a keyPairName to must be provided. Please ensure that at least one of them is not empty. | パラメーターが指定されていません。必須パラメーターを指定してください。 |
| 403 | InvalidOperation.DiskQueueNumberNotEnough | The number of disk queues on the instance is not enough. | インスタンスのディスクキュー数が不足しています。 |
| 403 | InvalidOperation.DiskAttachModeUnsupported | The instance type does not support the disk attach mode. | 現在のインスタンスタイプでは、ディスクのアタッチモードがサポートされていません。 |
| 403 | OperationDenied.HpnZoneMismatch | Instance and disk must be in the same HPN zone for restricted HPN zones. | 一部制限のある HPN リージョンでは、アタッチ操作を実行するためにインスタンスとディスクが同じ HPN リージョンにある必要があります。 |
| 403 | OperationDenied.UnsupportedEncryptedDisk | The instance type does not support attaching encrypted disks. | このインスタンスタイプは暗号化されたディスクのアタッチをサポートしていません。 |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | 指定されたインスタンスが存在しません。インスタンス ID が正しいかどうかを確認してください。 |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定されたディスクが存在しません。ディスク ID が正しいかどうかを確認してください。 |
| 404 | InvalidDisk.InUse | The specified disk has been occupied. | |
| 404 | DiskAttachedNumberExceeded | The attaching times of the specified disk exceeded. | |
| 404 | InvalidKMSKeyId.NotFound | The specified KMSKeyId does not exist. Please verify that the key ID is correct and that the key resides in the current region. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。