Démarre une instance ECS. Vous pouvez démarrer une instance en spécifiant l'identifiant de l'instance et en définissant éventuellement des paramètres tels que InitLocalDisk.
Description de l'opération
Il s'agit d'une opération asynchrone. L'instance ne démarre pas immédiatement après un appel réussi. L'instance entre d'abord dans l'état Starting. Appelez DescribeInstanceStatus pour interroger l'état de l'instance. Lorsque l'état renvoyé est Running, l'instance est démarrée.
Avant de commencer
Les instances verrouillées pour des raisons de sécurité ne peuvent pas être démarrées en appelant cette opération. Pour plus d'informations, consultez Impact des verrouillages de sécurité des ressources sur les appels d'API.
L'instance ECS doit être dans l'état Stopped (Stopped).
Les instances en mode économique peuvent ne pas démarrer en raison d'un stock insuffisant.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
ecs:StartInstance |
update |
*Instance
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| InstanceId |
string |
Oui |
L'identifiant de l'instance que vous souhaitez démarrer. |
i-bp67acfmxazb4p**** |
| InitLocalDisk |
boolean |
Non |
Indique si l'instance doit être restaurée à son état de santé initial en cas de défaillance d'un disque local. Ce paramètre s'applique aux familles d'instances qui utilisent des disques locaux, telles que les familles d'instances d1, i1 et i2. Valeurs valides :
Valeur par défaut : false. |
true |
| DryRun |
boolean |
Non |
Indique si un test à blanc uniquement doit être effectué, sans exécuter la requête réelle. Valeurs valides :
Valeur par défaut : false. |
true |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
|||
| RequestId |
string |
L'identifiant de la requête. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Exemples
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Codes d'erreur
|
Code de statut HTTP |
Code d'erreur |
Message d'erreur |
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 an internal error and you may retry later or contact support with the request ID. | |
| 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. | |
| 403 | OperationDenied.KMSKeyUnauthorized | The operation is denied due to missing KMS key authorization. Please check the KMS key permissions and ensure the key is properly authorized for this operation. | |
| 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. |
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.