You can call the UntagResources operation to unbind tags from resources.

  • If you call this operation to untag multiple resources simultaneously, either all or none of the resources will be untagged.
  • If you specify resource IDs without specifying tag keys and set the All parameter to true, all tags bound to the specified resources will be deleted. If a resource does not have any tags, the request is not processed but a success is returned.
  • If you specify resource IDs without specifying tag keys and set the All parameter to false, the request is not processed but a success is returned.
  • When tag keys are specified, the All parameter is invalid.
  • When multiple resources and key-value pairs are specified, the specified tags bound to the resources are deleted.

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
ResourceId.N RepeatList Yes 285bb759342649a1b70c2093a772e087

The ID of the resource.

Valid values of N: 1 to 50.

ResourceType String Yes apiGroup

The type of the resource. Tags are bound to API groups, plug-ins, and applications. You can use tags to manage cloud resources by group. Valid values:

  • apiGroup
  • plugin
  • app
Action String No UntagResources

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

All Boolean No true

Specifies whether to delete all tags. This parameter is valid only when the TagKey.Nparameter is not specified. Default value: false. Valid values:

  • true
  • false
TagKey.N RepeatList No env

The key of tag N.

Valid values of N: 1 to 20.

Response parameters

Parameter Type Example Description
RequestId String CEF72CEB-54B6-4AE8-B225-F876FF7BA984

The ID of the request.

Examples

Sample requests

  1. http(s)://apigateway.cn-qingdao.aliyuncs.com/? Action=UntagResources&ResourceId.1=285bb759342649a1b70c2093a772e087&ResourceType=apiGroup&<Common request parameters>

Sample success responses

XML format

  1. <UntagResourcesResponse> <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId></UntagResourcesResponse>

JSON format

  1. {“RequestId”:”CE5722A6-AE78-4741-A9B0-6C817D360510”}

Error codes

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

  1. </article>
  2. </main>