if (isBlank(environmentCNamePrefix))
throw new MojoExecutionException("You must declare cnamePrefix");
DescribeEnvironmentsRequest req = new DescribeEnvironmentsRequest()
.withApplicationName(applicationName);
DescribeEnvironmentsResult result = null;
String cNameToFind = String.format("%s.elasticbeanstalk.com",
environmentCNamePrefix);
getLog().info("Looking up for " + cNameToFind);
result = getService().describeEnvironments(req);
List<EnvironmentDescription> environments = new ArrayList<EnvironmentDescription>();
for (EnvironmentDescription d : result.getEnvironments())
if (cNameToFind.equals(d.getCNAME())&& (!d.getStatus().startsWith("Termin")))
environments.add(d);
return handleResults(environments);
}