Bir ECS örneğini durdurur. Örneği durdurmak için farklı kapatma yöntemleri, durdurma modları ve toplu işlem modları seçebilirsiniz.
Operation description
Bu işlem eşzamansızdır. Örnek hemen durdurulmaz. Başarılı bir çağrının ardından örnek önce Stopping durumuna geçer. Örnek durumunu sorgulamak için DescribeInstanceStatus API'sini çağırabilirsiniz. Döndürülen durum Stopped olduğunda, örnek başarıyla durdurulmuş olur.
Başlamadan önce
Güvenlik nedenleriyle kilitlenen örnekler bu işlem çağrılarak durdurulamaz. Daha fazla bilgi için Kaynak güvenlik kilidinin API çağrıları üzerindeki etkileri konusuna bakın.
VPC'deki örnekler için ekonomik modu etkinleştirdikten sonra, standart durdurma modunu etkinleştirmek üzere Ayarlar'da
StoppedMode=KeepChargingyapılandırmasını yapabilirsiniz. ECS örneği durdurulduktan sonra faturalandırma devam eder ve ECS örnek türü stoku ile İnternet IP adresi korunur.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:StopInstance |
update |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Örnek kimliği. |
i-bp67acfmxazb4ph**** |
| ConfirmStop |
boolean |
No |
Bu parametre kullanımdan kaldırılmıştır ve yalnızca uyumluluk amacıyla korunmuştur. Bu işlemi çağırırken bu parametreyi dikkate almayın. |
true |
| ForceStop |
boolean |
No |
Örneğin zorla durdurulup durdurulmayacağını belirtir. Geçerli değerler:
Varsayılan değer: false. |
false |
| StoppedMode |
string |
No |
Kullandıkça öde usulüne tabi bir ECS örneği için durdurma modu. Geçerli değerler:
Varsayılan değer: ECS konsolunda VPC'deki örnekler için ekonomik modu etkinleştirirseniz (daha fazla bilgi için Ekonomik modu varsayılan olarak etkinleştirme konusuna bakın) ve koşullar sağlanıyorsa, varsayılan değer |
KeepCharging |
| DryRun |
boolean |
No |
Deneme çalıştırması yapılıp yapılmayacağını belirtir. Geçerli değerler:
Varsayılan değer: false. |
true |
| Hibernate |
boolean |
No |
Not
Bu parametre davetli önizlemesi aşamasındadır ve kullanıma sunulmamıştır. |
hide |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
İstek kimliği. |
1C488B66-B819-4D14-8711-C4EAAA13AC01 |
Examples
Success response
JSON format
{
"RequestId": "1C488B66-B819-4D14-8711-C4EAAA13AC01"
}
Error codes
|
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. | |
| 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 | 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. | |
| 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. | |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.