Menyambungkan disk data atau disk sistem ke Instans ECS.
Deskripsi operasi
Saat memanggil operasi ini, perhatikan hal-hal berikut:
-
Instans dan disk harus berada di zona yang sama.
-
Disk harus berada dalam status Unattached (
Available). -
Saat menyambungkan disk data:
Instans ECS target harus berada dalam status Running (
Running) atau Stopped (Stopped).Jika disk dibeli secara terpisah, metode penagihannya harus pay-as-you-go.
Saat disk sistem yang telah dilepas dari Instans ECS disambungkan sebagai disk data, tidak ada batasan pada metode penagihannya.
Setelah elastic ephemeral disk dilepas, disk tersebut hanya dapat disambungkan kembali ke instans aslinya.
-
Saat menyambungkan disk sistem:
Instance ECS target harus merupakan instans sumber tempat disk sistem dilepas.
Instance ECS target harus berada dalam status Stopped (
Stopped).Anda harus menetapkan kredensial logon untuk instans.
Elastic ephemeral disk tidak dapat disambungkan sebagai disk sistem.
Untuk informasi selengkapnya tentang menyambungkan disk sistem, lihat Melepas atau menyambungkan disk sistem.
-
Saat mengkueri informasi tentang Instans ECS, jika tanggapan mengandung
{"OperationLocks": {"LockReason" : "security"}}, semua operasi pada instans tersebut dilarang.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:AttachDisk |
update |
*Disk
*Instance
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID Instans ECS tempat disk akan disambungkan. |
i-bp1dq5lozx5f4pmd**** |
| DiskId |
string |
Yes |
ID disk yang akan disambungkan. Disk ( Catatan
Baik disk data maupun disk sistem dapat disambungkan. Untuk batasan terkait, lihat deskripsi API di atas. |
d-bp1j4l5axzdy6ftk**** |
| Device |
string |
No |
Nama perangkat disk. Catatan
Parameter ini akan dihentikan penggunaannya. Untuk meningkatkan kompatibilitas, kami menyarankan Anda menggunakan parameter lain untuk mengidentifikasi disk. |
testDeviceName |
| DeleteWithInstance |
boolean |
No |
Apakah akan merilis disk bersama instans saat instans dirilis. Nilai valid:
Nilai default: false. Saat menetapkan parameter ini, perhatikan hal-hal berikut:
|
false |
| Bootable |
boolean |
No |
Apakah akan menyambungkan disk sebagai disk sistem. Nilai valid:
Nilai default: false. Catatan
Jika Anda menetapkan |
false |
| Password |
string |
No |
Saat menyambungkan disk sistem, tetapkan kata sandi untuk instans. Parameter ini hanya berlaku untuk nama pengguna administrator dan root; tidak berlaku untuk nama pengguna lain. Kata sandi harus memiliki panjang 8 hingga 30 karakter dan harus mengandung setidaknya tiga dari jenis karakter berikut: huruf besar, huruf kecil, angka, dan karakter khusus. Karakter khusus dapat berupa:
Untuk instans Windows, kata sandi tidak boleh diawali dengan garis miring (/). Catatan
Jika parameter |
EcsV587! |
| KeyPairName |
string |
No |
Saat menyambungkan disk sistem, nama pasangan kunci SSH yang akan diikat ke Instans ECS Linux.
|
KeyPairTestName |
| Force |
boolean |
No |
Apakah akan menyambungkan disk secara paksa. Nilai valid:
Nilai default: false. Catatan
Saat ini, hanya ESSD tipe redundan wilayah (cloud_regional_disk_auto) yang mendukung pengaturan bidang ini ke true. |
false |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Respons error
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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, can not be attached as 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 some unknown error, exception or failure. | |
| 403 | InstanceDiskLimitExceeded | The amount of the disk on instance in question reach its limits. | |
| 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 as your disk owing fee. | |
| 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 needs to be added ECS tag. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service have no right to access your KMS. | |
| 403 | DependencyViolation.WindowsInstance | The instance image is windows, cannot use ssh key pair to login. | |
| 403 | InvalidInstanceType.NotSupportDiskCategory | The instanceType of the specified instance does not support this disk category. | |
| 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. | |
| 403 | InvalidInstanceType.NvmeUnsupported | The instanceType of the specified instance does not support nvme protocol. | |
| 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. | |
| 403 | InvalidOperation.OtherInstanceUnsupported | The elastic ephemeral disk can only be attached to the instance it was last mounted on, please check the disk's 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. | |
| 403 | OperationDenied.UnsupportedEncryptedDisk | The instance type does not support attaching encrypted disks. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | |
| 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. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.