List of usage examples for com.amazonaws.services.cloudformation.model UpdateStackSetRequest setTemplateBody
public void setTemplateBody(String templateBody)
The structure that contains the template body, with a minimum length of 1 byte and a maximum length of 51,200 bytes.
From source file:de.taimos.pipeline.aws.cloudformation.stacksets.CloudFormationStackSet.java
License:Apache License
public UpdateStackSetResult update(String templateBody, String templateUrl, Collection<Parameter> params, Collection<Tag> tags) { this.listener.getLogger().format("Updating CloudFormation stack set %s %n", this.stackSet); UpdateStackSetRequest req = new UpdateStackSetRequest().withStackSetName(this.stackSet) .withCapabilities(Capability.CAPABILITY_IAM, Capability.CAPABILITY_NAMED_IAM).withParameters(params) .withTags(tags);/* w w w .j a v a 2 s . c om*/ if (templateBody != null && !templateBody.isEmpty()) { req.setTemplateBody(templateBody); } else if (templateUrl != null && !templateUrl.isEmpty()) { req.setTemplateURL(templateUrl); } else { req.setUsePreviousTemplate(true); } UpdateStackSetResult result = this.client.updateStackSet(req); this.listener.getLogger().format("Updated CloudFormation stack set %s %n", this.stackSet); return result; }