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

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

Introduction

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

Prototype


public void setKey(String key) 

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 .  j a  v a2s.com*/
    return creationTags;
}