Example usage for com.amazonaws.services.cloudformation.model Tag setValue

List of usage examples for com.amazonaws.services.cloudformation.model Tag setValue

Introduction

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

Prototype


public void setValue(String value) 

Source Link

Document

Required.

Usage

From source file:com.mweagle.tereus.commands.CreateCommand.java

License:Open Source License

protected List<Tag> toTagList(final Map<String, Object> values) {
    List<Tag> creationTags = values.entrySet().stream().map(eachEntry -> {
        Tag awsTag = new Tag();
        awsTag.setKey(eachEntry.getKey());
        awsTag.setValue(eachEntry.getValue().toString());
        return awsTag;
    }).collect(Collectors.toList());

    // Add the version tag
    // TODO - semver enforcement on updates
    final Tag versionTag = new Tag().withKey(String.format("%s:version", CONSTANTS.TEREUS_TAG_NAMESPACE))
            .withValue(CONSTANTS.TEREUS_VERSION);
    creationTags.add(versionTag);/*ww w.jav  a 2  s .co m*/
    return creationTags;
}