作者:手机用户2502863963 | 来源:互联网 | 2023-08-25 21:51
本文整理了Java中com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.terminateEnviro
本文整理了Java中com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.terminateEnvironment()
方法的一些代码示例,展示了AWSElasticBeanstalkClient.terminateEnvironment()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AWSElasticBeanstalkClient.terminateEnvironment()
方法的具体详情如下:
包路径:com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient
类名称:AWSElasticBeanstalkClient
方法名:terminateEnvironment
AWSElasticBeanstalkClient.terminateEnvironment介绍
[英]Terminates the specified environment.
[中]终止指定的环境。
代码示例
代码示例来源:origin: SINTEF-9012/cloudml
public void terminateEnvironment(String envName) {
TerminateEnvironmentRequest tr = new TerminateEnvironmentRequest();
tr.setEnvironmentName(envName);
beanstalkClient.terminateEnvironment(tr);
}
代码示例来源:origin: amazon-archives/aws-ant-tasks
public void execute() {
System.out
.println("Terminating environment " + environmentName + "...");
checkParams();
AWSElasticBeanstalkClient bcClient = getOrCreateClient(AWSElasticBeanstalkClient.class);
try {
bcClient.terminateEnvironment(new TerminateEnvironmentRequest()
.withEnvironmentName(environmentName));
} catch (Exception e) {
throw new BuildException("Could not terminate environment "
+ e.getMessage(), e);
}
System.out
.println("The request to terminate the environment has been submitted.");
}
}
代码示例来源:origin: ingenieux/beanstalker
@Override
protected TerminateEnvironmentResult executeInternal(TerminateEnvironmentContext context) throws Exception {
TerminateEnvironmentRequest req =
new TerminateEnvironmentRequest()
.withEnvironmentId(context.environmentId)
.withEnvironmentName(context.environmentName)
.withTerminateResources(context.terminateResources);
return service.terminateEnvironment(req);
}
}
代码示例来源:origin: amazon-archives/aws-ant-tasks
@After
public void tearDown() throws InterruptedException {
bcClient.terminateEnvironment(new TerminateEnvironmentRequest()
.withEnvironmentName(TEST_ENVIRONMENTNAME));
AWSTestUtils.waitForEnvironmentToTransitionToStateAndHealth(
TEST_ENVIRONMENTNAME, EnvironmentStatus.Terminated, null,
bcClient);
bcClient.deleteApplication(new DeleteApplicationRequest(TEST_APPNAME));
while (true) {
DescribeApplicationsResult appResult = bcClient
.describeApplications();
boolean appNameFound = false;
for (ApplicationDescription appdesc : appResult.getApplications()) {
if (appdesc.getApplicationName().equals(TEST_APPNAME)) {
appNameFound = true;
break;
}
}
if (!appNameFound) {
break;
}
}
}
}