Memulai Instance ECS. Anda dapat memulai instans dengan menentukan ID instans dan secara opsional menyetel parameter seperti InitLocalDisk.
Deskripsi operasi
Operasi ini bersifat asinkron. Instans tidak langsung dimulai setelah operasi dipanggil. Setelah operasi dipanggil, instans memasuki status Starting. Anda dapat memanggil DescribeInstanceStatus untuk mengkueri status instans. Ketika status yang dikembalikan adalah Running, instans telah dimulai.
Catatan penggunaan
Instans yang terkunci karena alasan keamanan tidak dapat dimulai dengan memanggil operasi ini. Untuk informasi selengkapnya, lihat Dampak penguncian Sumber daya pada operasi API.
Instance ECS harus berada dalam status Stopped.
Dalam mode hemat, memulai instans dapat gagal karena inventaris tidak mencukupi.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:StartInstance |
update |
*Instance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID instans yang ingin Anda mulai. |
i-bp67acfmxazb4p**** |
| InitLocalDisk |
boolean |
No |
Apakah akan memulihkan instans ke status kesehatan awal ketika disk lokal mengalami kerusakan. Parameter ini berlaku untuk instans dari keluarga instans yang menyertakan disk lokal, seperti d1, i1, dan i2. Nilai valid:
Nilai default: false. |
true |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run. Nilai valid:
Nilai default: false. |
true |
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": "C0003E8B-B930-4F59-ADC0-0E20xxxxxxxx"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | LackResource | There's no enough resource on the specified capacity reservation. | |
| 400 | InvalidDedicatedHost.NotEnoughResource | The specified dedicated host has not enough resource due to host affinity. | |
| 400 | InvalidInstance.NotFoundSystemDisk | The specified instance does not have system disk. | |
| 400 | Invalid.PrivatePoolOptions.NoStock | The PrivatePool has been used up. | |
| 500 | InstanceNotReady | The specified instance is not ready for use. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | InvalidParameter.KMSKeyId.NotFound | The specified KMSKeyId does not exist. | |
| 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 | InsufficientBalance | Your account does not have enough balance. | |
| 403 | DiskError | IncorrectDiskStatus. | |
| 403 | InstanceExpired | The postPaid instance has been expired.Please ensure your account have enough balance. | |
| 403 | InstanceNotReady | The specified instance is not ready for use. | |
| 403 | DiskInArrears | The specified operation is denied as your disk has expired. | |
| 403 | OperationDenied.SpotPriceLowerThanPublicPrice | The spot instance price is lower than public price. | |
| 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 | QuotaExceed.ElasticQuota | No additional quota is available for the specified ECS instance type. | |
| 403 | OperationDenied.HostRepairing | The specified operation is denied as the host of ECS instance is being repaired. | |
| 403 | OperationDenied.NoStock | The requested resource is sold out in the specified zone, try other types of resources or other regions and zones. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | |
| 404 | InvalidCapacityReservationId.NotFound | The specified capacity reservation does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | |
| 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.