Package com.amazonaws.services.elasticbeanstalk.model

Examples of com.amazonaws.services.elasticbeanstalk.model.UpdateEnvironmentRequest


  @Parameter(property = "beanstalk.whatToSet", defaultValue = "versionLabel", required = true)
  WhatToSet whatToSet;

  protected Object executeInternal() throws MojoExecutionException,
      MojoFailureException {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest();

    req.setEnvironmentId(curEnv.getEnvironmentId());
    req.setEnvironmentName(curEnv.getEnvironmentName());

    if (WhatToSet.versionLabel.equals(whatToSet)) {
      req.setVersionLabel(versionLabel);
    } else if (WhatToSet.description.equals(whatToSet)) {
      req.setDescription(environmentDescription);
    } else if (WhatToSet.optionSettings.equals(whatToSet)) {
      req.setOptionSettings(getOptionSettings(optionSettings));
    } else if (WhatToSet.templateName.equals(whatToSet)) {
      req.setTemplateName(lookupTemplateName(applicationName, templateName));
      // } else if (WhatToSet.optionsToRemove.equals(whatToSet)) {
      // req.setOptionsToRemove(optionsToRemove)
    }

    return getService().updateEnvironment(req);
View Full Code Here


  }

  @Override
  protected UpdateEnvironmentResult executeInternal(
      UpdateEnvironmentContext context) throws Exception {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest();
   
    if (null != context.environmentDescription)
        req.setDescription(context.environmentDescription);
   
    if (null != context.environmentId)
      req.setEnvironmentId(context.environmentId);
   
    if (null != context.optionSettings)
        req.setOptionSettings(Arrays.asList(context.optionSettings));

    if (context.useLatestVersionLabel) {
      req.setVersionLabel(context.latestVersionLabel);
    } else if (isNotBlank(context.versionLabel)) {
      info("Calling update-environment, and using versionLabel: " + context.versionLabel);
     
      req.setVersionLabel(context.versionLabel);
    } else if (isNotBlank(context.templateName)) {
      info("Calling update-environment, and using templateName: " + context.templateName);

      req.setTemplateName(context.templateName);
    }
   
    return service.updateEnvironment(req);
  }
View Full Code Here

* @goal update-environment
*/
public class UpdateEnvironmentMojo extends AbstractBeanstalkMojo {
  protected Object executeInternal() throws MojoExecutionException,
      MojoFailureException {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest()
        .withVersionLabel(versionLabel).withEnvironmentName(environmentName);

    return service.updateEnvironment(req);
  }
View Full Code Here

* @goal update-environment-options
*/
public class UpdateEnvironmentOptionsMojo extends AbstractBeanstalkMojo {
  protected Object executeInternal() throws MojoExecutionException,
      MojoFailureException {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest()
        .withOptionSettings(getOptionSettings()).withOptionsToRemove(
            getOptionsToRemove());

    return service.updateEnvironment(req);
  }
View Full Code Here

   */
  String templateName;

  protected Object executeInternal() throws MojoExecutionException,
      MojoFailureException {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest();

    req.setDescription(environmentDescription);
    req.setEnvironmentId(environmentId);
    req.setEnvironmentName(environmentName);
    req.setOptionSettings(getOptionSettings(optionSettings));
    req.setTemplateName(templateName);
    req.setVersionLabel(versionLabel);

    return service.updateEnvironment(req);
  }
View Full Code Here

  }

  @Override
  protected UpdateEnvironmentResult executeInternal(
      UpdateEnvironmentContext context) throws Exception {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest()
        .withDescription(context.environmentDescription)//
        .withEnvironmentId(context.environmentId)//
        .withEnvironmentName(context.environmentName)//
        .withOptionSettings(context.optionSettings)//
        .withTemplateName(context.templateName)//
View Full Code Here

  Object changeToVersion(EnvironmentDescription d,
      ApplicationVersionDescription latestVersionDescription) {
    String curVersionLabel = d.getVersionLabel();
    String versionLabel = latestVersionDescription.getVersionLabel();

    UpdateEnvironmentRequest request = new UpdateEnvironmentRequest()
        .withEnvironmentId(d.getEnvironmentId()).withVersionLabel(versionLabel);

    getLog().info(
        "Changing versionLabel for Environment[name=" + environmentName
            + "; environmentId=" + environmentId + "] from version "
View Full Code Here

* @goal update-environment
*/
public class UpdateEnvironmentMojo extends AbstractBeanstalkMojo {
  protected Object executeInternal() throws MojoExecutionException,
      MojoFailureException {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest()
        .withEnvironmentName(environmentName)
        .withOptionSettings(Arrays.asList(optionSettings))
        .withOptionsToRemove(getOptionsToRemove());

    return service.updateEnvironment(req);
View Full Code Here

     * Deploy the newly created version to the test environment.
     */
    private void deployVersion() throws AmazonClientException
    {
        log.info("Updating environment "+ environmentName +" with version " + versionLabel);
        UpdateEnvironmentRequest request = new UpdateEnvironmentRequest();
        request.setEnvironmentName(environmentName);
        request.setVersionLabel(versionLabel);

        UpdateEnvironmentResult result = beanstalk.updateEnvironment(request);
        log.info("SUCCESS! Version deploy requested. Application: " + applicationName + "; Environment: " + environmentName + " is now " + result.getStatus());
    System.exit(0);
    }
View Full Code Here

  Object changeToVersion(EnvironmentDescription d,
      ApplicationVersionDescription latestVersionDescription) {
    String curVersionLabel = d.getVersionLabel();
    String versionLabel = latestVersionDescription.getVersionLabel();

    UpdateEnvironmentRequest request = new UpdateEnvironmentRequest()
        .withEnvironmentId(d.getEnvironmentId()).withVersionLabel(versionLabel);

    getLog().info(
        "Changing versionLabel for Environment[name=" + curEnv.getEnvironmentName()
            + "; environmentId=" + curEnv.getEnvironmentId() + "] from version "
View Full Code Here

TOP

Related Classes of com.amazonaws.services.elasticbeanstalk.model.UpdateEnvironmentRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.