Elastic Compute Service (ECS) インスタンスから、従量課金データディスクまたはシステムディスクをデタッチします。
操作説明
次の点にご注意ください。
この操作は非同期操作です。この操作を呼び出して ECS インスタンスからディスクをデタッチした後、ディスクがデタッチされるまで約 1 分かかります。
インスタンスに関する情報をクエリした際、応答の
OperationLocksに"LockReason" : "security"が含まれている場合、そのインスタンスはセキュリティ上の理由でロックされており、すべての操作が禁止されています。インスタンスからデタッチしたエラスティック一時ディスクをアタッチする場合、そのディスクは元のインスタンスにのみアタッチできます。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ecs:DetachDisk |
update |
*Disk
*Instance
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| InstanceId |
string |
必須 |
ディスクをデタッチする ECS インスタンスの ID。 |
i-bp67acfmxazb4p**** |
| DiskId |
string |
必須 |
デタッチするディスクの ID。
|
d-bp67acfmxazb4p**** |
| DeleteWithInstance |
boolean |
任意 |
ディスクをデタッチするインスタンスがリリースされるときに、システムディスクまたはデータディスクをリリースするかどうかを指定します。有効な値:
デフォルト値:true。 次の点にご注意ください。
|
false |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
例
成功レスポンス
JSONJSON
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 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 detach disk. | |
| 400 | DisksDetachingOnEcsExceeded | The number of disks detaching on the instance exceeds the limit. | |
| 400 | InvalidInstanceId.Malformed | The specified parameter InstanceId is not valid. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. | |
| 403 | DiskNotPortable | The specified disk is not a portable disk. | |
| 403 | InstanceLockedForSecurity | The instance is locked due to security. | |
| 403 | DependencyViolation | The specified disk has not been attached on the specified instance. | |
| 403 | DiskTypeViolation | The specified disk is a system disk and cannot support the operation. | |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | |
| 403 | InvalidInstance.ImageCategory | The image category of the specified instance does not support detaching system disk. | |
| 403 | DeleteWithInstance.Conflict | Multi attach disk cannot be set to DeleteWithInstance attribute. | |
| 403 | InvalidOperation.DiskCategoryUnsupported | The DetachDisk operation is not supported for elastic ephemeral disk. | |
| 403 | InvalidParameter.DeleteWithInstance | The DeleteWithInstance for the elastic ephemeral disk must be set to true. | |
| 403 | InvalidOperation.DiskDetachingFromThisEcs | The specified disk is detaching from this ecs. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | |
| 404 | InvalidDisk.AlreadyDetached | The specified disk has been detached. | |
| 404 | InvalidDiskId.OperationNotSupported | The operation is not supported due to base image not exist. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。