throw new MojoExecutionException(message);
}
DescribeEnvironmentsRequest req = new DescribeEnvironmentsRequest()
.withApplicationName(applicationName);
DescribeEnvironmentsResult result = null;
if (bIdOrNameDefined) {
if (bIdDefined) {
req.setEnvironmentIds(Arrays.asList(environmentId));
} else if (bNameDefined) {
req.setEnvironmentNames(Arrays.asList(environmentName));
}
result = getService().describeEnvironments(req);
List<EnvironmentDescription> environments = result
.getEnvironments();
return handleResults(kind, environments);
}
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()))
environments.add(d);
return handleResults(kind, environments);
}