Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use Untag with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use Untag with a CLI

The following code examples show how to use Untag.

CLI
AWS CLI

To remove tags from a resource group

The following untags example removes any tag with the specified key from the resource group itself, not its members.

aws resource-groups untag \ --arn arn:aws:resource-groups:us-west-2:123456789012:group/tbq-WebServer \ --keys QueryType

Output:

{ "Arn": "arn:aws:resource-groups:us-west-2:123456789012:group/tbq-WebServer", "Keys": [ "QueryType" ] }

For more information, see Manage tags in the AWS Resource Groups User Guide.

  • For API details, see Untag in AWS CLI Command Reference.

PowerShell
Tools for PowerShell

Example 1: This example removes mentioned tag from the resource group

Remove-RGResourceTag -Arn arn:aws:resource-groups:eu-west-1:123456789012:group/workboxes -Key Instances

Output:

Confirm Are you sure you want to perform this action? Performing the operation "Remove-RGResourceTag (Untag)" on target "arn:aws:resource-groups:eu-west-1:933303704102:group/workboxes". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y Arn Keys --- ---- arn:aws:resource-groups:eu-west-1:123456789012:group/workboxes {Instances}
  • For API details, see Untag in AWS Tools for PowerShell Cmdlet Reference.

AWS CLI

To remove tags from a resource group

The following untags example removes any tag with the specified key from the resource group itself, not its members.

aws resource-groups untag \ --arn arn:aws:resource-groups:us-west-2:123456789012:group/tbq-WebServer \ --keys QueryType

Output:

{ "Arn": "arn:aws:resource-groups:us-west-2:123456789012:group/tbq-WebServer", "Keys": [ "QueryType" ] }

For more information, see Manage tags in the AWS Resource Groups User Guide.

  • For API details, see Untag in AWS CLI Command Reference.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.