データディスクまたはシステムディスクを 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. | 指定されたイメージアーキテクチャは、このインスタンスタイプをサポートしていません。 |
| 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. | ディスクの状態では、この操作はサポートされていません。続行するには、ディスクが InUse または Available の状態である必要があります。 |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | ユーザーが ARN 関連パラメーター操作リストに含まれていません。 |
| 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. | 指定されたイメージは Alibaba Cloud マーケットプレイスのイメージであるため、インスタンスと一緒にリリースする設定の無効化はサポートされていません。 |
| 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. | この操作では password と keyPairName の両方を空にできません。password または keyPairName の少なくとも一方を指定してください。 |
| 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. | 指定されたディスクが存在しません。 |
| 404 | InvalidDisk.InUse | The specified disk has been occupied. | |
| 404 | DiskAttachedNumberExceeded | The attaching times of the specified disk exceeded. | |
| 404 | InvalidKMSKeyId.NotFound | The KMS key used by the disk does not exist. | 指定された KMS キー ID が存在しません。 |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。