/** * <p> * The name of the application. If no application is found with this name, and <code>AutoCreateApplication</code> is * <code>false</code>, returns an <code>InvalidParameterValue</code> error. * </p> * * @param applicationName * The name of the application. If no application is found with this name, and * <code>AutoCreateApplication</code> is <code>false</code>, returns an <code>InvalidParameterValue</code> * error. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateApplicationVersionRequest withApplicationName(String applicationName) { setApplicationName(applicationName); return this; }
/** * Constructs a new CreateApplicationVersionRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param applicationName * The name of the application. If no application is found with this name, and * <code>AutoCreateApplication</code> is <code>false</code>, returns an <code>InvalidParameterValue</code> * error. * @param versionLabel * A label identifying this version.</p> * <p> * Constraint: Must be unique per application. If an application version already exists with this label for * the specified application, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error. */ public CreateApplicationVersionRequest(String applicationName, String versionLabel) { setApplicationName(applicationName); setVersionLabel(versionLabel); }
/** * <p> * The name of the application. If no application is found with this name, and <code>AutoCreateApplication</code> is * <code>false</code>, returns an <code>InvalidParameterValue</code> error. * </p> * * @param applicationName * The name of the application. If no application is found with this name, and * <code>AutoCreateApplication</code> is <code>false</code>, returns an <code>InvalidParameterValue</code> * error. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateApplicationVersionRequest withApplicationName(String applicationName) { setApplicationName(applicationName); return this; }
/** * Constructs a new CreateApplicationVersionRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param applicationName * The name of the application. If no application is found with this name, and * <code>AutoCreateApplication</code> is <code>false</code>, returns an <code>InvalidParameterValue</code> * error. * @param versionLabel * A label identifying this version.</p> * <p> * Constraint: Must be unique per application. If an application version already exists with this label for * the specified application, AWS Elastic Beanstalk returns an <code>InvalidParameterValue</code> error. */ public CreateApplicationVersionRequest(String applicationName, String versionLabel) { setApplicationName(applicationName); setVersionLabel(versionLabel); }
protected Object executeInternal() throws MojoExecutionException { if (skipExisting) { if (versionLabelExists()) { getLog().info("VersionLabel " + versionLabel + " already exists. Skipping creation of new application-version"); return null; } } CreateApplicationVersionRequest request = new CreateApplicationVersionRequest(); request.setApplicationName(applicationName); request.setDescription(versionDescription); request.setAutoCreateApplication(autoCreateApplication); if (StringUtils.isNotBlank(s3Bucket) && StringUtils.isNotBlank(s3Key)) { request.setSourceBundle(new S3Location(s3Bucket, s3Key)); } request.setDescription(versionDescription); request.setVersionLabel(versionLabel); CreateApplicationVersionResult result = getService().createApplicationVersion(request); return result.getApplicationVersion(); }