getLog().info("Terminating environmentId=" + environmentId);
TerminateEnvironmentContext terminatecontext = new TerminateEnvironmentContextBuilder()
.withEnvironmentId(environmentId)
.withTerminateResources(true).build();
TerminateEnvironmentCommand command = new TerminateEnvironmentCommand(
this);
command.execute(terminatecontext);
}
{
WaitForEnvironmentContext context = new WaitForEnvironmentContextBuilder()
.withApplicationName(applicationName)
.withEnvironmentId(environmentId)
.withStatusToWaitFor("Terminated")
.withTimeoutMins(timeoutMins).build();
WaitForEnvironmentCommand command = new WaitForEnvironmentCommand(
this);
command.execute(context);
}
}