Example usage for com.amazonaws.services.rds AmazonRDS listTagsForResource

List of usage examples for com.amazonaws.services.rds AmazonRDS listTagsForResource

Introduction

In this page you can find the example usage for com.amazonaws.services.rds AmazonRDS listTagsForResource.

Prototype

ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest);

Source Link

Document

Lists all tags on an Amazon RDS resource.

Usage

From source file:com.optimalbi.Services.LocalRDSService.java

License:Apache License

public Map<String, String> getTags() {
    AmazonRDS rds = new AmazonRDSClient(this.getCredentials().getCredentials());
    String arn = thisService.getTdeCredentialArn();
    ListTagsForResourceResult tagsList = rds
            .listTagsForResource(new ListTagsForResourceRequest().withResourceName(arn));

    List<Tag> tagList = tagsList.getTagList();
    Map<String, String> tagMap = new HashMap<>();
    for (Tag t : tagList) {
        tagMap.put(t.getKey(), t.getValue());
    }/*from  w ww.ja  v  a 2s.c  om*/
    return tagMap;
}