Whatever message this page gives is out now! Go check it out!

UntagQueue

Last update:
May 18, 2026

Description

This function removes the tags that were added to a queue. To know more about adding tags to a queue, see TagQueue.
For more information, see UntagQueue from Amazon developer docs.

Category

AWS SQS functions

History

ColdFusion (2020 release): New in this version.

Syntax

untagQueue(queueUrl, map)
queueObject.tag(queueUrl)

Parameters

Parameter
Description
Type
Required
queueURL
The url of the queue which is to be untagged.
String
Yes
map
The tags to be removed from the specified queue.
Struct
Yes
For more information, see untagQueue parameters.

Example

In the sample code below, we'll perform the following:
  1. Create a standard queue.
  2. Add a few tags to the queue.
  3. Remove the tags from the queue.
<cfscript> 
    cred={ 
        "credentialAlias" : "alias", 
        "vendorName" : "AWS", 
        "region" : "us-east-2", 
        "secretAccessKey" : "secret access", 
        "accessKeyId" : "access key" 
    } 
     
    conf={ 
        "serviceName"="SQS" 
    } 
     
    sqs=cloudService(cred, conf) 
 
    // Step 1: create a queue 
    sqs.createQueue("myTagQueue") 
 
    // get the queue url 
    myQueueUrl=sqs.getQueueUrl("myTagQueue") 
    writeOutput(myQueueUrl) 
 
    // Step 2: add tags to the queue 
    tagMetadata={ 
        "tags"={ 
            "Product":"ColdFusion", 
            "Version":"2020", 
            "Build":"300300", 
            "Date":"2020/02/28", 
            "Location":"Adobe" 
        } 
    } 
     
     
    try{ 
        sqs.tagQueue(myQueueUrl,tagMetadata) 
        writeOutput("Tags added successfully") 
    } 
    catch(any e){ 
        writeDump(e) 
    } 
 
    // Step 3: remove tags from the queue 
     
    tagsToBeRemoved = { 
        "tagKeys"=["Product","Version"] 
    } 
     
    try{ 
        untagResponse=sqs.untagQueue(myQueueUrl,tagsToBeRemoved) 
        writeOutput("Tags removed successfully")         
    } 
    catch (any e){ 
        writeDump(e) 
    } 
 
    // Step 4: list the remaining tags 
    tagList=sqs.listQueueTags(myQueueUrl) 
    writeDump(tagList.tags) 
</cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page