Utilisation de ExitStandby avec une CLI - Amazon EC2 Auto Scaling

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

Utilisation de ExitStandby avec une CLI

Les exemples de code suivants illustrent comment utiliser ExitStandby.

CLI
AWS CLI

Pour sortir les instances du mode veille

Cet exemple sort l’instance spécifiée du mode veille.

aws autoscaling exit-standby \ --instance-ids i-061c63c5eb45f0416 \ --auto-scaling-group-name my-asg

Sortie :

{ "Activities": [ { "ActivityId": "142928e1-a2dc-453a-9b24-b85ad6735928", "AutoScalingGroupName": "my-asg", "Description": "Moving EC2 instance out of Standby: i-061c63c5eb45f0416", "Cause": "At 2020-10-31T20:32:50Z instance i-061c63c5eb45f0416 was moved out of standby in response to a user request, increasing the capacity from 0 to 1.", "StartTime": "2020-10-31T20:32:50.222Z", "StatusCode": "PreInService", "Progress": 30, "Details": "{\"Subnet ID\":\"subnet-6194ea3b\",\"Availability Zone\":\"us-west-2c\"}" } ] }

Pour plus d’informations, consultez Suppression temporaire des instances du groupe Auto Scaling dans le Guide de l’utilisateur Amazon EC2 Auto Scaling.

  • Pour plus de détails sur l'API, voir ExitStandbyla section Référence des AWS CLI commandes.

PowerShell
Outils pour PowerShell V4

Exemple 1 : cet exemple fait sortir l’instance spécifiée du mode veille.

Exit-ASStandby -InstanceId i-93633f9b -AutoScalingGroupName my-asg

Sortie :

ActivityId : 1833d3e8-e32f-454e-b731-0670ad4c6934 AutoScalingGroupName : my-asg Cause : At 2015-11-22T15:51:21Z instance i-95b8484f was moved out of standby in response to a user request, increasing the capacity from 1 to 2. Description : Moving EC2 instance out of Standby: i-95b8484f Details : {"Availability Zone":"us-west-2b","Subnet ID":"subnet-5264e837"} EndTime : Progress : 30 StartTime : 11/22/2015 7:51:21 AM StatusCode : PreInService StatusMessage :
  • Pour plus de détails sur l'API, reportez-vous ExitStandbyà la section Référence des Outils AWS pour PowerShell applets de commande (V4).

Outils pour PowerShell V5

Exemple 1 : cet exemple fait sortir l’instance spécifiée du mode veille.

Exit-ASStandby -InstanceId i-93633f9b -AutoScalingGroupName my-asg

Sortie :

ActivityId : 1833d3e8-e32f-454e-b731-0670ad4c6934 AutoScalingGroupName : my-asg Cause : At 2015-11-22T15:51:21Z instance i-95b8484f was moved out of standby in response to a user request, increasing the capacity from 1 to 2. Description : Moving EC2 instance out of Standby: i-95b8484f Details : {"Availability Zone":"us-west-2b","Subnet ID":"subnet-5264e837"} EndTime : Progress : 30 StartTime : 11/22/2015 7:51:21 AM StatusCode : PreInService StatusMessage :
  • Pour plus de détails sur l'API, reportez-vous ExitStandbyà la section Référence des Outils AWS pour PowerShell applets de commande (V5).

Pour obtenir la liste complète des guides de développement du AWS SDK et des exemples de code, consultezUtilisation de ce service avec un AWS SDK. Cette rubrique comprend également des informations sur le démarrage et sur les versions précédentes du kit SDK.