/** * <p> * Specify an application name to show only application versions for that application. * </p> * * @param applicationName * Specify an application name to show only application versions for that application. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeApplicationVersionsRequest withApplicationName(String applicationName) { setApplicationName(applicationName); return this; }
/** * <p> * Specify an application name to show only application versions for that application. * </p> * * @param applicationName * Specify an application name to show only application versions for that application. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeApplicationVersionsRequest withApplicationName(String applicationName) { setApplicationName(applicationName); return this; }
protected Object executeInternal() throws MojoExecutionException { DescribeApplicationVersionsRequest describeApplicationVersionsRequest = new DescribeApplicationVersionsRequest(); describeApplicationVersionsRequest.setApplicationName(applicationName); return getService().describeApplicationVersions(describeApplicationVersionsRequest); } }
public void deleteOldVersions(String applicationName) { DescribeApplicationVersionsRequest search = new DescribeApplicationVersionsRequest(); search.setApplicationName(applicationName); List<ApplicationVersionDescription> versions = elasticBeanstalk.describeApplicationVersions(search).getApplicationVersions(); List<ApplicationVersionDescription> versionsToRemove = versionsToRemove(versions); Set<String> deployedLabels = findDeployedLabels(applicationName); log.info("Removing {} oldest versions of total {} versions", versionsToRemove.size(), versions.size()); for (ApplicationVersionDescription version : versionsToRemove) { if (deployedLabels.contains(version.getVersionLabel())) { log.info("Not removing version {} because it is deployed", version.getVersionLabel()); } else { deleteApplicationVersion(version); } } }
public void deleteOldVersions(String applicationName) { DescribeApplicationVersionsRequest search = new DescribeApplicationVersionsRequest(); search.setApplicationName(applicationName); List<ApplicationVersionDescription> versions = elasticBeanstalk.describeApplicationVersions(search).getApplicationVersions(); List<ApplicationVersionDescription> versionsToRemove = versionsToRemove(versions); Set<String> deployedLabels = findDeployedLabels(applicationName); log.info("Removing {} oldest versions of total {} versions", versionsToRemove.size(), versions.size()); for (ApplicationVersionDescription version : versionsToRemove) { if (deployedLabels.contains(version.getVersionLabel())) { log.info("Not removing version {} because it is deployed", version.getVersionLabel()); } else { deleteApplicationVersion(version); } } }