Example usage for com.amazonaws.services.elasticbeanstalk.model UpdateConfigurationTemplateRequest setOptionSettings

List of usage examples for com.amazonaws.services.elasticbeanstalk.model UpdateConfigurationTemplateRequest setOptionSettings

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticbeanstalk.model UpdateConfigurationTemplateRequest setOptionSettings.

Prototype


public void setOptionSettings(java.util.Collection<ConfigurationOptionSetting> optionSettings) 

Source Link

Document

A list of configuration option settings to update with the new specified option value.

Usage

From source file:br.com.ingenieux.mojo.beanstalk.config.UpdateConfigurationTemplateMojo.java

License:Apache License

UpdateConfigurationTemplateResult updateConfiguration(String templateName) throws MojoFailureException {
    ConfigurationTemplate template = getConfigurationTemplate(templateName);

    if (null == template) {
        throw new MojoFailureException(String.format("templateName ('%s') not found", templateName));
    }/*from w ww .  jav a2s .c  o m*/

    if (isBlank(template.getSolutionStack())) {
        throw new MojoFailureException(
                String.format("Please define solutionStack/ in template %s", templateName));
    }

    UpdateConfigurationTemplateRequest req = new UpdateConfigurationTemplateRequest(applicationName,
            templateName);

    req.setOptionSettings(Arrays.asList(template.getOptionSettings()));

    return getService().updateConfigurationTemplate(req);
}