You can call this operation to unbind tags from ApsaraDB for Redis instances.

  • You can unbind up to 20 tags in each call.
  • If a tag is not bound to any instances after you unbind the tag from an instance, the tag is deleted.

You can also unbind tags from instances in the console. For more information, see Unbind a tag.

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 No UntagResources

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

RegionId String Yes cn-hangzhou

The ID of the region where the specified instance is located. You can call the DescribeRegions operation to query the latest regions.

ResourceId.N RepeatList Yes r-hp3xxxxxxxxxxxxx

The ID of the instance from which you want to unbind tags. You can specify multiple IDs.

Note For more information about how to specify multiple IDs, see the sample request.
ResourceType String Yes INSTANCE

The type of the specified resource. Set the value to INSTANCE.

TagKey.N RepeatList No demokey

The key of tag N.

Note For more information about how to specify the tag key, see the sample request.
All Boolean No false

Specifies whether to unbind all tags from the specified instance. Valid values:

  • true
  • false
Note
  • Default value: false
  • If the TagKey.N parameter is specified, this parameter does not take effect.

Response parameters

Parameter Type Example Description
RequestId String 601B6F25-21E7-4484-99D5-3EF2625C0088

The ID of the request.

Examples

Sample requests

https://r-kvstore.aliyuncs.com/
? Action=UntagResources
&RegionId=cn-huhehaote
&ResourceId.1=r-hp1xxxxxxxxxxxxx
&ResourceId.2=r-hp2xxxxxxxxxxxxx
&ResourceType=INSTANCE
&Tag.1.Key=demokey1
&Tag.2.Key=demokey2
&<Common request parameters>

Sample success responses

XML format

<UntagResourcesResponse>
      <RequestId>601B6F25-21E7-4484-99D5-3EF2625C0088</RequestId>
</UntagResourcesResponse>

JSON format

{
	"RequestId": "601B6F25-21E7-4484-99D5-3EF2625C0088"
}

Error codes

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