AWS Elastic Beanstalk
开发人员指南
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 Amazon AWS 入门

stop

注意

该版本的 EB CLI 及其文档已替换成版本 3 (在本部分中,EB CLI 3 表示 EB CLI 的版本 3 及更高版本)。有关新版本的信息,请参阅 Elastic Beanstalk 命令行界面 (EB CLI)

描述

终止环境。有关介绍如何使用 eb stop 终止环境的教程,请参阅开始使用 Eb

注意

stop 操作应用于环境,而不应用于应用程序。要删除应用程序及其环境,请使用 eb delete

语法

eb stop

选项

名称 描述 必需

-e

或者

--environment-name ENVIRONMENT_NAME

要终止的环境。该环境必须包含当前应用程序;您不能指定不在当前所用存储库中的应用程序。

类型:字符串

默认设置:当前设置

常用选项

有关更多信息,请参阅 Eb 通用选项

输出

如果成功,则该命令返回 stop 操作的状态。

示例 1

下面的示例请求将终止环境。

PROMPT> eb stop If you terminate your environment, your RDS DB Instance will be deleted and you will lose your data. Terminate environment? [y/n]: y Stopping environment "MyApp-env". This may take a few minutes. 2014-05-13 07:18:10 INFO terminateEnvironment is starting. 2014-05-13 07:18:17 INFO Waiting for EC2 instances to terminate. This may take a few minutes. 2014-05-13 07:19:43 INFO Deleted EIP: xxx.xxx.xxx.xx 2014-05-13 07:19:43 INFO Deleted security group named: awseb-e-zEXAMPLEng-stack- AWSEBSecurityGroup-MEEXAMPLENHQ 2014-05-13 07:19:51 INFO Deleting SNS topic for environment MyApp-env. 2014-05-13 07:19:52 INFO terminateEnvironment completed successfully. Stop of environment "MyApp-env" has completed.

示例 2

下面的示例请求终止名为 MyApp-test-env 的环境。

PROMPT> eb stop -e MyApp-test-env If you terminate your environment, your RDS DB Instance will be deleted and you will lose your data. Terminate environment? [y/n]: y Stopping environment "MyApp-test-env". This may take a few minutes. 2014-05-15 17:27:09 INFO terminateEnvironment is starting. 2014-05-15 17:27:16 INFO Waiting for EC2 instances to terminate. This may take a few minutes. 2014-05-15 17:27:42 INFO Deleted EIP: xxx.xxx.xxx.xx 2014-05-15 17:27:42 INFO Deleted security group named: awseb-e-zEXAMPLEngstack- AWSEBSecurityGroup-MEEXAMPLENHQ 2014-05-15 17:34:50 INFO Deleting SNS topic for environment MyApp-testenv. 2014-05-15 17:34:51 INFO terminateEnvironment completed successfully. 2013-05-15 17:29:55 INFO Deleted Auto Scaling group named: awseb-e-mqmp6mmcpk-stack-AWSEBAutoScalingGroup-QALO012HZJVJ 2013-05-15 17:29:56 INFO Deleted Auto Scaling launch configuration named: awseb-e-mqmp6mmcpk-stack-AWSEBAutoScalingLaunchConfiguration-1DBGPQ99YFX08 2013-05-15 17:34:11 INFO Deleted RDS database named: aauel5gap2gqb4 2013-05-15 17:34:16 INFO Deleted security group named: awseb-e-mqmp6mmcpk-stack-AWSEBSecurityGroup-1LDYFT0256P0B 2013-05-15 17:34:17 INFO Deleted load balancer named: awseb-e-m-AWSEBLoa-CT74SPXN541T 2013-05-15 17:34:29 INFO Deleting SNS topic for environment MyOtherApp-env. 2013-05-15 17:34:30 INFO terminateEnvironment completed successfully. Stop of environment "MyApp-test-env" has completed.