Skip to content

Untag Resources

resourcegroupstaggingapi_untag_resources R Documentation

Removes the specified tags from the specified resources

Description

Removes the specified tags from the specified resources. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from a resource that were already removed. Note the following:

  • To remove tags from a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for removing tags. For more information, see the documentation for the service whose resource you want to untag.

  • You can only tag resources that are located in the specified Amazon Web Services Region for the calling Amazon Web Services account.

Minimum permissions

In addition to the tag:UntagResources permission required by this operation, you must also have the remove tags permission defined by the service that created the resource. For example, to remove the tags from an Amazon EC2 instance using the untag_resources operation, you must have both of the following permissions:

  • tag:UntagResource

  • ec2:DeleteTags

Usage

resourcegroupstaggingapi_untag_resources(ResourceARNList, TagKeys)

Arguments

ResourceARNList

[required] Specifies a list of ARNs of the resources that you want to remove tags from.

An ARN (Amazon Resource Name) uniquely identifies a resource. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

TagKeys

[required] Specifies a list of tag keys that you want to remove from the specified resources.

Value

A list with the following syntax:

list(
  FailedResourcesMap = list(
    list(
      StatusCode = 123,
      ErrorCode = "InternalServiceException"|"InvalidParameterException",
      ErrorMessage = "string"
    )
  )
)

Request syntax

svc$untag_resources(
  ResourceARNList = list(
    "string"
  ),
  TagKeys = list(
    "string"
  )
)