Menghentikan instans ECS. Anda dapat memilih metode penghentian, mode berhenti, dan mode operasi batch yang berbeda untuk menghentikan instans.
Deskripsi operasi
Operasi ini bersifat asinkron. Instans tidak langsung berhenti. Setelah pemanggilan berhasil, instans pertama kali memasuki status Stopping. Anda dapat memanggil DescribeInstanceStatus untuk mengkueri status instans. Ketika status yang dikembalikan adalah Stopped, instans berhasil dihentikan.
Sebelum Anda memulai
Instans yang terkunci karena alasan keamanan tidak dapat dihentikan dengan memanggil operasi ini. Untuk informasi selengkapnya, lihat Dampak kunci keamanan Sumber daya pada pemanggilan API.
Setelah Anda mengaktifkan mode hemat untuk instans di VPC, Anda dapat mengonfigurasi
StoppedMode=KeepChargingdi Pengaturan untuk mengaktifkan mode berhenti standar. Setelah instans ECS dihentikan, penagihan berlanjut, dan inventaris tipe instans serta alamat IP Internet dipertahankan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:StopInstance |
update |
*Instance.
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID instans. |
i-bp67acfmxazb4ph**** |
| ConfirmStop |
boolean |
No |
Parameter ini telah didepresiasi dan dipertahankan hanya untuk tujuan kompatibilitas. Abaikan parameter ini saat Anda memanggil operasi ini. |
true |
| ForceStop |
boolean |
No |
Apakah akan menghentikan instans secara paksa. Nilai valid:
Nilai default: false. |
false |
| StoppedMode |
string |
No |
Mode berhenti untuk instans ECS pay-as-you-go. Nilai valid:
Nilai default: Jika Anda mengaktifkan mode hemat untuk instans di VPC di Konsol ECS (untuk informasi selengkapnya, lihat Mengaktifkan mode hemat secara default) dan kondisi terpenuhi, nilai default adalah |
KeepCharging |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run. Nilai valid:
Nilai default: false. |
true |
| Hibernate |
boolean |
No |
Catatan
Parameter ini berada dalam pratinjau undangan dan tidak tersedia untuk digunakan. |
hide |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
1C488B66-B819-4D14-8711-C4EAAA13AC01 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "1C488B66-B819-4D14-8711-C4EAAA13AC01"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.Encrypted.KmsNotEnable | The operation failed because KMS is not activated. Please activate KMS in the KMS console and try again. | |
| 400 | DiskError | IncorrectDiskStatus. | Disk yang ditentukan berada dalam status tidak valid. |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | InstanceLockedForSecurity | The specified operation is denied as your instance is locked for security reasons. | Instans tempat disk tersambung terkunci karena alasan keamanan. |
| 403 | InstanceType.ParameterMismatch | The input parameter ConfirmStop must be true when an instance have localstorage. | Ketika instans menggunakan penyimpanan lokal, parameter ConfirmStop harus diatur ke true. |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | InvalidInstanceId.NotSupport | Classic network Instance does not support this operation. | Operasi ini tidak didukung untuk spot instans. |
| 403 | InvalidParameter.KMSKeyId.CMKUnauthorized | The CMK needs to be added ECS tag | |
| 403 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | |
| 403 | InvalidParameter.KMSKeyId.KMSUnauthorized | The ECS service is not authorized to access your KMS key. Please grant the ECS service permission to use the key and try again. | |
| 403 | HibernationConfigured.InstanceOperationForbidden | The operation is not permitted due to limit of the hibernation configured instance. | Operasi tidak diizinkan karena instans tidak memenuhi persyaratan untuk mengaktifkan opsi hibernasi. |
| 403 | HibernationConfigured.NotEnabled | The instance hibernation configured option is not enabled. | |
| 403 | InvalidOperation.KMSKeyIdNotFound | The specified KMSKeyId does not exist. Please verify that the key ID is correct and that the key resides in the current region. | |
| 403 | InvalidOperation.KMSServiceNotOpen | KMS service is currently not open. | Key Management Service (KMS) belum diaktifkan. |
| 403 | OperationDenied.SystemInstanceNotSupport | The system instance does not support the %s operation because %s. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | Instans yang ditentukan tidak ada. Periksa apakah ID instans sudah benar. |
| 503 | LimitedOperation.ServiceUnavailable | The service is currently unavailable. Please try again later. | Layanan saat ini tidak tersedia. Coba lagi nanti. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.