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

UntagResource

Last update:
May 18, 2026

Description

This function removes tags from a resource.
For more information, see UntagResource.

Category

History

ColdFusion (2021 release): Added this function.

Syntax

serviceHandle.untagResource(requestParameters)

Parameters

See the request parameters of UntagResource.

Example

<cfscript> 
    cred = { 
        "credentialAlias" : "myalias", 
        "vendorName" : "AWS", 
        "region" : "us-east-2", 
        "secretAccessKey" : "xxxxx", 
        "accessKeyId" : "xxxx" 
   } 
    config = { 
        "serviceName" = "DYNAMODB" 
      } 
    dynamo = getCloudService(cred, config) 
 
    // Tag resources 
    tableName="YearlyProductCatalog" 
  // Get table ARN 
  describeStruct={ 
    "TableName":"#tableName#" 
  } 
  describeStructResponse=dynamo.describeTable(describeStruct) 
  ARN=describeStructResponse.Table.TableArn 
  // tag resource 
  tagResourceStrct={ 
    "ResourceArn":ARN, 
    "Tags":[ 
      {"Key":"Key001","Value":"Value001"}, 
      {"Key":"Key002","Value":"Value002"}, 
      {"Key":"Key003","Value":"Value003"}, 
      {"Key":"Key004","Value":"Value004"} 
    ] 
  } 
  try{ 
    tagResourceResponse=dynamo.tagResource(tagResourceStrct) 
    writeOutput("Resource tagged successfully") 
    writeDump(tagResourceResponse) 
  } 
  catch(any e){ 
    writeDump(e) 
  } 
 
  // untag the resource 
  untagResourceStruct={ 
    "ResourceArn":ARN, 
    "TagKeys":["Key001","Key002"] 
  } 
  try{ 
    unTagResourceResponse=dynamo.unTagResource(untagResourceStruct) 
    writeOutput("Resource un-tagged successfully") 
    writeDump(unTagResourceResponse) 
  } 
  catch(any e){ 
    writeDump(e) 
  } 
</cfscript>

Output

Figure: UntagResource output
UntagResource output

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