List of usage examples for com.amazonaws.services.cloudformation.model Tag setKey
public void setKey(String key)
Required.
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 . j a v a2s.com*/ return creationTags; }