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

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

Introduction

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

Prototype


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

Source Link

Document

If specified, AWS Elastic Beanstalk sets the specified configuration option to the requested value.

Usage

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

License:Apache License

CreateConfigurationTemplateResult createConfiguration(String templateName) throws MojoFailureException {
    ConfigurationTemplate template = getConfigurationTemplate(templateName);

    if (null == template) {
        throw new MojoFailureException(String.format("templateName ('%s') not found", templateName));
    }/* w  w w  .  ja  v  a  2 s.  c  o  m*/

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

    CreateConfigurationTemplateRequest req = new CreateConfigurationTemplateRequest(applicationName,
            templateName);

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

    return getService().createConfigurationTemplate(req);
}