Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.
Utilizzare ExitStandby con una CLI
I seguenti esempi di codice mostrano come usare ExitStandby.
- CLI
-
- AWS CLI
-
Come impostare l’uscita delle istanze dalla modalità standby
Quanto segue
exit-standbyL'esempio sposta l'istanza specificata fuori dalla modalità standby.aws autoscaling exit-standby \ --instance-idsi-061c63c5eb45f0416\ --auto-scaling-group-namemy-asgOutput:
{ "Activities": [ { "ActivityId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "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\"}" } ] }Per ulteriori informazioni, consulta Rimozione temporanea di istanze dal gruppo Auto Scaling nella Guida per l’utente di Amazon EC2 Auto Scaling.
-
Per i dettagli sull'API, vedi ExitStandby
nel AWS CLI Riferimento al comando.
-
- PowerShell
-
- Strumenti per PowerShell V4
-
Esempio 1: questo esempio imposta l’uscita dell’istanza specificata dalla modalità standby.
Exit-ASStandby -InstanceId i-93633f9b -AutoScalingGroupName my-asgOutput:
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 :-
Per i dettagli sull'API, vedi ExitStandby nel AWS Strumenti per PowerShell Riferimento al cmdlet (V4).
-
- Strumenti per PowerShell V5
-
Esempio 1: questo esempio imposta l’uscita dell’istanza specificata dalla modalità standby.
Exit-ASStandby -InstanceId i-93633f9b -AutoScalingGroupName my-asgOutput:
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 :-
Per i dettagli sull'API, vedi ExitStandby nel AWS Strumenti per PowerShell Riferimento al cmdlet (V5).
-
Per un elenco completo di AWS Guide per sviluppatori SDK ed esempi di codice, consulta L'utilizzo di questo servizio con un AWS SDK. Questo argomento include anche informazioni su come iniziare e dettagli sulle versioni precedenti dell’SDK.