public void make() { TvaritEnvironment tvaritEnvironment = TvaritEnvironment.getInstance(); AmazonCloudFormationClient amazonCloudFormationClient = TvaritEnvironment.getInstance().getAmazonCloudFormationClient(); CreateStackRequest createVpcStackRequest = new CreateStackRequest(); URL url; try { url = tvaritEnvironment.getTemplateUrlMaker().makeUrl("base/main.template"); } catch (MalformedURLException e) { throw new RuntimeException(e); } createVpcStackRequest .withTemplateURL(url.toString()) .withStackName("tvarit-base-infrastructure"); List<Parameter> makeVpcParameters = new MakeBaseInfrastructureParameterMaker().make(); createVpcStackRequest .withParameters(makeVpcParameters) .withCapabilities(Capability.CAPABILITY_IAM); amazonCloudFormationClient.createStack(createVpcStackRequest); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateStackRequest == false) return false; CreateStackRequest other = (CreateStackRequest) obj; if (other.getStackName() == null ^ this.getStackName() == null) return false; if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == false) return false; if (other.getTemplateBody() == null ^ this.getTemplateBody() == null) return false; if (other.getTemplateBody() != null && other.getTemplateBody().equals(this.getTemplateBody()) == false) return false; if (other.getTemplateURL() == null ^ this.getTemplateURL() == null) return false; if (other.getTemplateURL() != null && other.getTemplateURL().equals(this.getTemplateURL()) == false) return false; if (other.getParameters() == null ^ this.getParameters() == null) return false; if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == false) return false; if (other.isDisableRollback() == null ^ this.isDisableRollback() == null) return false; if (other.isDisableRollback() != null && other.isDisableRollback().equals(this.isDisableRollback()) == false) return false; if (other.getTimeoutInMinutes() == null ^ this.getTimeoutInMinutes() == null) return false; if (other.getTimeoutInMinutes() != null && other.getTimeoutInMinutes().equals(this.getTimeoutInMinutes()) == false) return false; if (other.getNotificationARNs() == null ^ this.getNotificationARNs() == null) return false; if (other.getNotificationARNs() != null && other.getNotificationARNs().equals(this.getNotificationARNs()) == false) return false; if (other.getCapabilities() == null ^ this.getCapabilities() == null) return false; if (other.getCapabilities() != null && other.getCapabilities().equals(this.getCapabilities()) == false) return false; if (other.getOnFailure() == null ^ this.getOnFailure() == null) return false; if (other.getOnFailure() != null && other.getOnFailure().equals(this.getOnFailure()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; }