Examples of UpdateEnvironmentRequest


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

  }

  @Override
  protected UpdateEnvironmentResult executeInternal(
      UpdateEnvironmentContext context) throws Exception {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest();
   
    if (null != context.environmentDescription)
        req.setDescription(context.environmentDescription);

        if (null != context.environmentName) {
            req.setEnvironmentName(context.environmentName);
        } else if (null != context.environmentId) {
      req.setEnvironmentId(context.environmentId);
        }

        if (null != context.getEnvironmentTierName()) {
            String envTierType = "Standard";
            String envTierVersion = "1.0";

            if ("Worker".equals(context.getEnvironmentTierName())) {
                envTierType = "SQS/JSON";
            }

            req.setTier(new EnvironmentTier().withName(context.getEnvironmentTierName()).withType(envTierType).withVersion(envTierVersion));
        }
   
    if (null != context.optionSettings && 0 != context.optionSettings.length)
        req.setOptionSettings(Arrays.asList(context.optionSettings));

        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

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

  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

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

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

  String envValue;

  protected Object executeInternal() throws Exception {
    waitForNotUpdating();

    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest()
        .withEnvironmentId(curEnv.getEnvironmentId());

    req.setOptionSettings(Arrays.asList(new ConfigurationOptionSetting()
        .withNamespace("aws:elasticbeanstalk:application:environment")
        .withOptionName(envName).withValue(envValue)));

    UpdateEnvironmentResult result = getService().updateEnvironment(req);
View Full Code Here

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

   */
  @Parameter(property = "beanstalk.envValue", required=true)
  String envValue;

  protected Object executeInternal() throws Exception {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest()
        .withEnvironmentId(curEnv.getEnvironmentId());

    req.setOptionSettings(Arrays.asList(new ConfigurationOptionSetting()
        .withNamespace("aws:elasticbeanstalk:application:environment")
        .withOptionName(envName).withValue(envValue)));

    UpdateEnvironmentResult result = getService().updateEnvironment(req);

View Full Code Here

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

  }

  @Override
  protected UpdateEnvironmentResult executeInternal(
      UpdateEnvironmentContext context) throws Exception {
    UpdateEnvironmentRequest req = new UpdateEnvironmentRequest()
        .withDescription(context.environmentDescription)//
        .withEnvironmentId(context.environmentId)//
        .withEnvironmentName(context.environmentName)//
        .withOptionSettings(context.optionSettings);
   
    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

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(templateName);
//    } else if (WhatToSet.optionsToRemove.equals(whatToSet)) {
//      req.setOptionsToRemove(optionsToRemove)
    }

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

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

  @MojoParameter(expression="${beanstalk.whatToSet}", defaultValue="versionLabel", required=true)
  WhatToSet whatToSet;

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

    req.setEnvironmentId(environmentId);
    req.setEnvironmentName(environmentName);

    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(templateName);
//    } else if (WhatToSet.optionsToRemove.equals(whatToSet)) {
//      req.setOptionsToRemove(optionsToRemove)
    }

    return getService().updateEnvironment(req);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.