List of usage examples for com.amazonaws.services.elasticbeanstalk.model DescribeEnvironmentsRequest setApplicationName
public void setApplicationName(String applicationName)
If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.
From source file:br.com.ingenieux.mojo.beanstalk.env.DescribeEnvironmentsMojo.java
License:Apache License
@Override protected Object executeInternal() throws MojoExecutionException, MojoFailureException { DescribeEnvironmentsRequest req = new DescribeEnvironmentsRequest(); req.setApplicationName(applicationName); req.setIncludeDeleted(includeDeleted); // TODO add environmentNames / environmentIds / includeDeletedBackTo DescribeEnvironmentsResult result = getService().describeEnvironments(req); if (null != outputFile) { getLog().info("Writing results into " + outputFile.getName()); try {/* w w w . j av a2s . co m*/ ObjectMapper objectMapper = new ObjectMapper(); ObjectWriter writer = objectMapper.writerWithDefaultPrettyPrinter(); writer.writeValue(outputFile, result.getEnvironments()); } catch (Exception e) { throw new RuntimeException(e); } return null; } return result; }