UntagResources

Updated at:

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.

    Note

    User-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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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: The deletion succeeded.

  • false: The deletion failed.

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.