データクラウドディスクまたはシステムクラウドディスクを Elastic Compute サービス (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 に設定できるのは、リージョンエンタープライズ SSD (ESSD) ( |
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 disk category of the specified disk does not support the current operation. Please check the operations supported by the disk category and try again. | |
| 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. | 指定されたインスタンスタイプはサポートされていません。 |
| 400 | InvalidOperation.EncryptedDiskUnsupported | The specified encrypted disk is not supported for this operation. | |
| 400 | InvalidOperation.ForceAttachConflict | The device still has mount residue on the source instance. Please ensure no residual mount points exist in the source instance and try again. | |
| 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 instance type of the specified instance does not support the specified disk category. Please call DescribeAvailableResource to query the supported disk category and try again. | |
| 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。