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

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

Introduction

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

Prototype


public void setSolutionStackName(String solutionStackName) 

Source Link

Document

The name of the solution stack used by this configuration.

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));
    }/*from  w  w w.j  ava 2  s . co 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);
}