Mengaktifkan atau menonaktifkan perlindungan penghapusan untuk instans.
Deskripsi operasi
Deskripsi operasi
Setelah Anda mengaktifkan perlindungan penghapusan untuk instans, Anda tidak dapat menghapus instans tersebut. Untuk menghapus instans, nonaktifkan perlindungan penghapusan terlebih dahulu.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DeletionProtection |
delete |
*Address
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah tempat instans yang akan diatur perlindungan penghapusannya berada. Anda dapat memanggil DescribeRegions untuk melihat daftar wilayah Alibaba Cloud terbaru. |
cn-hangzhou |
| ProtectionEnable |
boolean |
Yes |
Apakah akan mengaktifkan perlindungan penghapusan. Nilai valid:
|
true |
| Type |
string |
Yes |
Tipe instans yang akan diaktifkan atau dinonaktifkan perlindungan penghapusannya. Nilai valid:
|
EIP |
| InstanceId |
string |
Yes |
ID instans yang akan diaktifkan atau dinonaktifkan perlindungan penghapusannya. |
eip-uf6id7gvguruxe41v**** |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan token, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. Token hanya dapat berisi karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan API sebagai ClientToken. RequestId dapat berbeda untuk setiap permintaan API. |
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
Yes |
要设置删除保护功能的实例所在的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
BAAEF103-96C4-4454-9210-066F2405F511 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "BAAEF103-96C4-4454-9210-066F2405F511"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | DeletionProtection.ResourceNotExist | The resource is not exist. | The resource does not exist. |
| 400 | DeletionProtection.PrePaidNotSupport | The prepaid resource is not support. | Subscription resources are not supported. |
| 400 | DeletionProtection.TypeNotSupport | The resource is not support. | This type of resource is not supported. |
| 400 | DeletionProtection.AlreadyEnabled | The resource deletion protection is already enabled. | The deletion protection feature is already enabled for the resource. |
| 400 | DeletionProtection.OwnerError | The resource owner error. | You are not the owner of the resource and cannot perform operations on it. |
| 404 | InvalidAllocationId.NotFound | Specified allocation ID is not found | The specified EIP does not exist. Check whether the parameter value is valid. |
| 404 | DeletionProtection.NotExist | The resource deletion protection is not found | The deletion protection feature of the resource does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.