Mengubah nama, deskripsi, perilaku rilis, kebijakan penghapusan snapshot otomatis, kebijakan snapshot otomatis, pengaturan lonjakan performa, dan atribut lainnya dari satu atau beberapa perangkat penyimpanan blok.
Deskripsi operasi
Anda dapat memanggil parameter DiskId untuk mengubah nama, deskripsi, perilaku rilis, dan atribut lainnya dari satu perangkat penyimpanan blok, atau memanggil parameter DiskIds.N untuk mengubah atribut beberapa perangkat penyimpanan blok pada satu pengatur waktu.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyDiskAttribute |
update |
*Disk
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DiskId |
string |
No |
ID disk yang atributnya ingin Anda ubah. Catatan
Parameter DiskId dan DiskIds.N tidak dapat ditentukan pada pengatur waktu yang sama. Tentukan salah satunya sesuai kebutuhan. |
d-bp1famypsnar20bv**** |
| DiskName |
string |
No |
Nama disk. Nama harus memiliki panjang 2 hingga 128 karakter dan dapat berisi huruf, digit, serta karakter yang dikategorikan sebagai huruf dalam Unicode, termasuk karakter Tionghoa. Nama dapat berisi titik dua (:), garis bawah (_), titik (.), dan tanda hubung (-). |
MyDiskName |
| Description |
string |
No |
Deskripsi disk. Deskripsi harus memiliki panjang 2 hingga 256 karakter dan tidak dapat diawali dengan |
TestDescription |
| DeleteWithInstance |
boolean |
No |
Apakah akan merilis disk bersama instans. Nilai default: null, yang menunjukkan bahwa nilai saat ini tidak diubah. Error dikembalikan jika Anda mengatur HapusWithInstance menjadi
Peringatan Jika Anda mengatur HapusWithInstance menjadi false dan instance ECS tempat disk menyambungkan terkunci keamanan dengan "LockReason" : "security" di OperationLocks, atribut HapusWithInstance akan diabaikan dan disk akan dirilis bersama instans. |
false |
| DeleteAutoSnapshot |
boolean |
No |
Apakah akan menghapus snapshot otomatis disk saat disk dihapus. Nilai valid:
Nilai default: null, yang menunjukkan bahwa nilai saat ini tidak diubah. |
false |
| EnableAutoSnapshot |
boolean |
No |
Apakah akan mengaktifkan kebijakan snapshot otomatis untuk disk. Nilai valid:
Nilai default: null, yang menunjukkan bahwa nilai saat ini tidak diubah. Catatan
Parameter ini tidak digunakan lagi. Kebijakan snapshot otomatis diaktifkan secara default untuk disk setelah dibuat. Anda hanya perlu mengaitkan kebijakan snapshot otomatis dengan disk. |
true |
| RegionId |
string |
No |
ID wilayah. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| DiskIds |
array |
No |
ID disk yang atributnya ingin Anda ubah. Nilai valid N: 0 hingga 100. Catatan
Parameter DiskId dan DiskIds.N tidak dapat ditentukan pada pengatur waktu yang sama. Tentukan salah satunya sesuai kebutuhan. |
d-bp1famypsnar20bv**** |
|
string |
No |
ID disk yang atributnya ingin Anda ubah. Nilai valid N: 0 hingga 100. Catatan
Parameter DiskId dan DiskIds.N tidak dapat ditentukan pada pengatur waktu yang sama. Tentukan salah satunya sesuai kebutuhan. |
d-bp1famypsnar20bv**** |
|
| BurstingEnabled |
boolean |
No |
Apakah akan mengaktifkan fitur lonjakan performa untuk disk yang mendukung fitur ini. Nilai valid:
Catatan
Error dikembalikan jika Anda menentukan parameter ini untuk disk yang tidak mendukung fitur lonjakan performa. |
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 | InvalidDiskName.Malformed | The specified disk name is wrongly formed. | The format of the disk name is invalid. The name must be 2 to 128 characters in length and start with a letter or Chinese character. It can contain digits, periods (.), underscores (_), and hyphens (-). It cannot start with http:// or https://. |
| 400 | NoAttributeToModify | No attribute to be modified in this request. | |
| 400 | IncompleteParamter | Some fields can not be null in this request. | A parameter is missing in the request. |
| 400 | InvalidRegionId.MalFormed | The specified RegionId is not valid. | |
| 400 | MissingParameter.DiskIdOrDiskIds | Specified parameter DiskId or DiskIds is missing. | |
| 400 | ParameterConflict.DiskIdAndDiskIds | Specified parameter DiskId and DiskIds conflict, only one can be chosen. | |
| 400 | BurstingEnabledForDiskCategoryUnsupported | The specified disk category does not support bursting enabled. | The specified disk category does not support the performance burst feature. |
| 400 | BurstingEnabledForMultiAttachDiskUnsupported | The multi attach disk does not support bursting enabled. | Multi-attach disks do not support the performance burst feature. |
| 400 | BurstingEnabledForModifyingDiskUnsupported | The modifying disk does not support bursting enabled. | Disks being reconfigured do not support modification of the burst feature. |
| 400 | InvalidBurstingEnabled.DiskSizeTooSmall | The disk size must be greater than 3 GiB to enable burst. | The performance burst feature can be enabled only when the disk size is greater than 3 GiB. |
| 403 | QuotaExceed.Snapshot | The snapshot quota exceeds. | |
| 403 | DiskNotPortable | The specified disk is not a portable disk. | |
| 403 | IncorrectDiskStatus | The operation is not supported in this status. | The current disk does not support this operation. Make sure that the disk is in a normal usage state and that there are no overdue payments. |
| 403 | UserNotInTheWhiteList | The user is not in disk white list. | You are not in the disk whitelist. Please join the whitelist and try again. |
| 403 | DeleteWithInstance.Conflict | The specified image is from the image market, you cannot set DeleteWithInstance attribute to false. | The specified image is from the image marketplace and does not support disabling release with the instance. |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | The specified disk does not exist. Check whether the disk ID is correct. |
| 404 | InvalidDescription.Malformed | The specified description is wrongly formed. | |
| 404 | InvalidInstanceId.NotFound | Specified attached instance does not exist. | The specified instance does not exist. Check whether the instance ID is correct. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.