Example usage for com.amazonaws.services.s3.model TagSet setTag

List of usage examples for com.amazonaws.services.s3.model TagSet setTag

Introduction

In this page you can find the example usage for com.amazonaws.services.s3.model TagSet setTag.

Prototype

public void setTag(String key, String value) 

Source Link

Document

Sets the value of the tag for a given key.

Usage

From source file:com.eucalyptus.cloudformation.resources.standard.actions.AWSS3BucketResourceAction.java

License:Open Source License

private BucketTaggingConfiguration convertTags(List<CloudFormationResourceTag> tags) {
    BucketTaggingConfiguration bucketTaggingConfiguration = new BucketTaggingConfiguration();
    // In theory BucketTaggingConfiguration
    Collection<TagSet> tagSets = Lists.newArrayList();
    TagSet tagSet = new TagSet();
    for (CloudFormationResourceTag cloudformationResourceTag : tags) {
        tagSet.setTag(cloudformationResourceTag.getKey(), cloudformationResourceTag.getValue());
    }/*  www .  j ava 2  s . c o  m*/
    tagSets.add(tagSet);
    bucketTaggingConfiguration.setTagSets(tagSets);
    return bucketTaggingConfiguration;
}