UntagResources
Deletes the user resource tag associations for a specified instance.
Operation description
When you call this operation, note the following items:
-
You can delete only user-defined tags.
NoteUser-defined tags are tags that are manually added to instances by users. System tags are tags that are added to user instances by cloud services (Alibaba Cloud services). System tags are divided into visible tags and invisible tags.
-
If a tag is not associated with any resources, the tag is also deleted when the resource tag associations are deleted.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:RemoveTags |
none |
*All Resource
|
None | None |
Request syntax
DELETE /openapi/tags HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceIds |
string |
Yes |
The list of resources to delete. |
["es-cn-09k1rocex0006****","es-cn-oew1rgiev0009****"] |
| ResourceType |
string |
Yes |
The resource type. Set the value to INSTANCE. |
INSTANCE |
| TagKeys |
string |
No |
The list of tags to delete. You can specify up to 20 tags. |
["tagKey1","tagKey2"] |
| All |
boolean |
No |
Specifies whether to delete all tags. Default value: false. This parameter takes effect only when TagKeys is empty. |
false |
| body |
string |
No |
This operation uses the ResourceIds, ResourceType, TagKeys, and All query parameters to delete tags. You do not need to specify the body parameter. |
test-body-1202a |
If TagKeys is empty and All is set to true, this operation deletes all resource tag associations for the resources. If a resource has no tags, the operation does not process the resource and returns a success response.
If TagKeys is empty and All is set to false, the operation does not process the request and returns a success response.
If TagKeys is not empty, the All parameter is ignored regardless of whether it is set to true or false.
If TagKeys is specified, this operation deletes the specified tags from the resources. If a specified tag does not exist on a resource, the tag is not processed.
If the resources do not exist, this operation returns InvalidResourceId.NotFound.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Result |
boolean |
The returned result. Valid values:
|
true |
| RequestId |
string |
The request ID. |
F99407AB-2FA9-489E-A259-40CF6D****** |
Examples
Success response
JSON format
{
"Result": true,
"RequestId": "F99407AB-2FA9-489E-A259-40CF6D******"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.