Example usage for com.amazonaws.services.cloudformation.model UpdateStackSetRequest setTemplateURL

List of usage examples for com.amazonaws.services.cloudformation.model UpdateStackSetRequest setTemplateURL

Introduction

In this page you can find the example usage for com.amazonaws.services.cloudformation.model UpdateStackSetRequest setTemplateURL.

Prototype


public void setTemplateURL(String templateURL) 

Source Link

Document

The location of the file that contains the template body.

Usage

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 av a2 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;
}