本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
以下代码示例演示如何使用 ExitStandby
。
- AWS CLI
-
将实例移出备用模式
此示例将指定的实例移出备用模式。
aws autoscaling exit-standby \ --instance-ids
i-061c63c5eb45f0416
\ --auto-scaling-group-namemy-asg
输出:
{ "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\"}" } ] }
有关更多信息,请参阅 Amazon Auto Scaling 用户指南中的临时从 Aut EC2 o Sc aling 组中移除实例。
-
有关 API 的详细信息,请参阅AWS CLI 命令参考ExitStandby
中的。
-
有关 S AWS DK 开发者指南和代码示例的完整列表,请参阅将此服务与 AWS SDK 配合使用。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。