Menghentikan instans Elastic Compute Service (ECS). Anda dapat menentukan strategi penghentian, mode penghentian, dan mode operasi batch yang berbeda untuk menghentikan instans ECS.
Deskripsi operasi
Ini adalah operasi asinkron. Instans ECS tidak langsung berhenti setelah pemanggilan berhasil. Instans ECS pertama kali memasuki status Stopping. Anda dapat memanggil DescribeInstanceStatus untuk mengkueri status instans. Ketika status yang dikembalikan adalah Stopped, Instans ECS telah berhenti.
Sebelum Anda memulai
Instans ECS 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 yang terhubung ke VPC, Anda dapat menyetel
StoppedMode=KeepCharginguntuk mengaktifkan mode penghentian standar. Penagihan instans ECS berlanjut setelah dihentikan, 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 akan segera dihentikan penggunaannya dan hanya dipertahankan 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 penghentian untuk instans ECS pay-as-you-go. Nilai valid:
Nilai default: Jika Anda mengaktifkan mode hemat untuk instans yang terhubung ke 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 saja. 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 | Failed to perform this operation because KMS is not activated. | |
| 400 | DiskError | IncorrectDiskStatus. | |
| 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. | |
| 403 | InstanceType.ParameterMismatch | The input parameter ConfirmStop must be true when an instance have localstorage. | |
| 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. | |
| 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 | ECS service have no right to access your KMS. | |
| 403 | HibernationConfigured.InstanceOperationForbidden | The operation is not permitted due to limit of the hibernation configured instance. | |
| 403 | HibernationConfigured.NotEnabled | The instance hibernation configured option is not enabled. | |
| 403 | InvalidOperation.KMSKeyIdNotFound | The specified KMSKeyId not found, %s. | |
| 403 | InvalidOperation.KMSServiceNotOpen | KMS service is currently not open. | |
| 403 | OperationDenied.SystemInstanceNotSupport | The system instance does not support the %s operation because %s. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | |
| 503 | LimitedOperation.ServiceUnavailable | The service is currently unavailable. Please try again later. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.