List of usage examples for com.amazonaws.services.elasticbeanstalk.model CreateEnvironmentResult toString
@Override
public String toString()
From source file:org.cloudml.connectors.BeanstalkConnector.java
License:Open Source License
public void createEnvironment(String applicationName, String domainName, String envName, String stackName) { CreateEnvironmentRequest cr = new CreateEnvironmentRequest(); cr.setApplicationName(applicationName); cr.setEnvironmentName(envName);//from ww w . j a va 2 s . com String stack = findSolutionStack(stackName); if (!stack.equals("")) { cr.setSolutionStackName(stack); CheckDNSAvailabilityResult r = checkDNS(domainName); if (r.isAvailable()) { cr.setCNAMEPrefix(domainName); CreateEnvironmentResult res = beanstalkClient.createEnvironment(cr); journal.log(Level.INFO, ">> Status of the environment creation: " + res.toString()); } else { journal.log(Level.INFO, ">> Status of the environment creation: Domain Name already existing"); } } else { journal.log(Level.INFO, ">> Status of the environment creation: This type of stack does not exist!"); } }
From source file:org.cloudml.connectors.BeanstalkConnector.java
License:Open Source License
public String createEnvironmentWithWar(String applicationName, String domainName, String envName, String stackName, int minRam, String warFile, String versionLabel) { String endPoint = ""; prepareWar(new File(warFile), versionLabel, applicationName); CreateEnvironmentRequest cr = new CreateEnvironmentRequest(); cr.setApplicationName(applicationName); cr.setEnvironmentName(envName);/* w w w . j ava2s. c o m*/ cr.setVersionLabel(versionLabel); String stack = findSolutionStack(stackName); if (!stack.equals("")) { cr.setSolutionStackName(stack); CheckDNSAvailabilityResult r = checkDNS(domainName); if (r.isAvailable()) { cr.setCNAMEPrefix(domainName); CreateEnvironmentResult res = beanstalkClient.createEnvironment(cr); endPoint = res.getEndpointURL(); journal.log(Level.INFO, ">> Status of the environment creation: " + res.toString()); } else { journal.log(Level.INFO, ">> Status of the environment creation: Domain Name already existing"); } } else { journal.log(Level.INFO, ">> Status of the environment creation: This type of stack does not exist!"); } return endPoint; }