LrSqsClient.tagQueue

Adds tags to the LrSqsClient's current queue.

public static void tagQueue(Map<String, String> tags)

Arguments

NameDescription
tags New tags to be added to the queue.

Return values

This function does not return any values.

General information

This API adds the tags specified in the tags argument to the queue. For details about the SQS tags, see the Amazon SQS documentation.

Example

Copy code
public void tags(){
        LrSqsClient.initClient(region, fifoQueueUrl);
        Map<String, String> allTags = LrSqsClient.listQueueTags();
        
        for (Map.Entry<String, String> entry : allTags.entrySet()){
            lr.output_message("key: " + entry.getKey() + " value: " + entry.getValue());
        }
        
        LrSqsClient.tagQueue(new HashMap()
                {{
                      put("tag1", "tagvalue1");
                 }});
        
        allTags = LrSqsClient.listQueueTags();
        
        for (Map.Entry<String, String> entry : allTags.entrySet()){
            lr.output_message("key: " + entry.getKey() + " value: " + entry.getValue());
        }
        
        LrSqsClient.untagQueue(new ArrayList()
                {{
                      add("tag1");
                 }});
        
        allTags = LrSqsClient.listQueueTags();
        for (Map.Entry<String, String> entry : allTags.entrySet()){
            lr.output_message("key: " + entry.getKey() + " value: " + entry.getValue());
        }
        
        LrSqsClient.closeClient();
  }