public String createChangeSet(String changeSetName, String stackName, ChangeSetType changeSetType, String templateBody, Collection<Parameter> parameters) { LOG.info("Creating change set for stack {} with name {}, type {} and parameters {}", stackName, changeSetName, changeSetType, parameters); final CreateChangeSetRequest changeSetRequest = new CreateChangeSetRequest() // .withCapabilities(Capability.CAPABILITY_IAM) // .withStackName(stackName) // .withDescription(stackName) // .withChangeSetName(changeSetName) // .withChangeSetType(changeSetType) // .withParameters(parameters).withTemplateBody(templateBody); final CreateChangeSetResult result = cloudFormation.createChangeSet(changeSetRequest); LOG.info("Change set created: {}", result); return result.getId(); }
/** * Allows you to add any number of nested preconfigured Capability elements. * Will warn you if the Capability is not supported by our model, but will * still try to execute. * * @param capability * a preconfigured Capability object. */ public void addConfiguredCapability(StackCapability capability) { String toAdd = capability.getValue(); try { Capability.fromValue(toAdd); } catch (IllegalArgumentException e) { System.out .println("The capability " + toAdd + " does not seem to be in our model. If this build fails, this may be why."); } finally { capabilities.add(toAdd); } }