Removes tags from resource groups or the members in a resource directory.

Usage notes

This topic provides an example on how to call the API operation to remove the tag whose tag key is k1 from the resource group whose ID is rg-aek2dpwyrfr****.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UntagResources

The operation that you want to perform. Set the value to UntagResources.

All Boolean No false

Specifies whether to remove all tags from the specified resource groups or members. Valid values:

  • false (default value)
  • true
ResourceId.N String Yes rg-aek2dpwyrfr****

The ID of a resource group or member.

You can specify a maximum of 50 IDs.

TagKey.N String No k1

A tag key.

You can specify a maximum of 20 tag keys.

Note If you set the All parameter to true, you do not need to configure this parameter.
ResourceType String No ResourceGroup

The type of the objects from which you want to remove tags. Valid values:

  • ResourceGroup: resource group. This is the default value.
  • Account: member.
Note This parameter is required if you remove tags from members in a resource directory.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C

The ID of the request.

Examples

Sample requests

https://resourcemanager.aliyuncs.com/?Action=UntagResources
&ResourceId.1=rg-aek2dpwyrfr****
&TagKey.1=k1
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UntagResourcesResponse>
    <RequestId>E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C</RequestId>
</UntagResourcesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "E7747EDF-EDDC-5B38-9B6A-6392B9C92B1C"
}

Error codes

For a list of error codes, visit the API Error Center.