Removes tags from keys or secrets.
You can remove multiple tags from multiple keys or multiple secrets at a time. You cannot remove tags that start with aliyun or acs:.
If you enter multiple tag keys in the request parameters and only some of the tag keys are associated with resources, the operation can be called and the tags whose keys are associated with resources are removed from the resources.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UntagResources | The operation that you want to perform. Set the value to UntagResources. |
RegionId | String | Yes | cn-hangzhou | The ID of the region to which the resource belongs. Note You can call the DescribeRegions operation to query a list of available regions of the current Alibaba Cloud account. |
ResourceType | String | Yes | key | The type of the resource from which you want to remove tags. Valid values:
|
All | Boolean | No | false | Specifies whether to remove all tags from resources. Valid values:
Note This parameter takes effect only when you specify an empty tag key. |
ResourceId.N | String | No | key-hzz62f1cb66fa42qo**** | The IDs of the resources from which you want to remove tags. You can enter up to 50 resource IDs. Enter multiple resource IDs in the |
TagKey.N | String | No | disk-encryption | The key of the tag that you want to remove. You can enter up to 20 tag keys. Enter multiple tag keys in the Note The tag key cannot start with aliyun or acs:. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | b1f210dc-e52c-4a86-b9dd-7492343d46c7 | The request ID. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=UntagResources
&RegionId=cn-hangzhou
&ResourceType=key
&All=false
&ResourceId=["key-hzz62f1cb66fa42qo****"]
&TagKey=["disk-encryption"]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UntagResourcesResponse>
<RequestId>b1f210dc-e52c-4a86-b9dd-7492343d46c7</RequestId>
</UntagResourcesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "b1f210dc-e52c-4a86-b9dd-7492343d46c7"
}
Error codes
Http status code | Error code | Error message | Description |
---|---|---|---|
404 | InvalidAccessKeyId.NotFound | The Access Key ID provided does not exist in our records. | The specified AccessKey ID does not exist. |
404 | InvalidResourceId.NotFound | The specified ResourceId is not found. | The specified resource ID is not found. |
For a list of error codes, see Service error codes.