ListTagResources

Updated at:

Retrieves the relationships between all instances and tags.

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:ListTagResource

none

*All Resource

*

None None

Request syntax

GET /openapi/tags HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Page deprecated

integer

No

The page number of the resource relationship list. This parameter is deprecated.

1

Size deprecated

integer

No

The number of entries per page for paged query. This is a deprecated field. Settings for paging are no longer supported.

10

ResourceType

string

Yes

The resource type definition.

INSTANCE

NextToken

string

No

The token for the next query.

1d2db86sca4384811e0b5e8707e******

ResourceIds

string

No

The list of instance IDs to query. The value is in JSON array format and supports up to 20 items.

["es-cn-aaa","es-cn-bbb"]

Tags

string

No

The list of tags to query. The value is in JSON string format and contains up to 20 items.

[{"key":"env", "value":"dev"},{"key":"dev", "value":"IT"}]

  • You must specify at least one of the ResourceIds and Tags parameters. Otherwise, an error is returned.

  • You can query only visible system tags. You cannot query invisible tags.
    Note

    System tags are tags that cloud services add to user instances. System tags are classified into visible tags and invisible tags.

Response elements

Element

Type

Description

Example

object

The response object.

PageSize

integer

The page number.

1

RequestId

string

The request ID.

F99407AB-2FA9-489E-A259-40CF6D******

Headers

object

The response header information. This parameter is empty and is for reference only. Do not create a dependency on this parameter in your program.

Note

This parameter is not included in the response example.

X-Total-Count

integer

The resource count of TagResource entries found.

10

TagResources

object

The tag resource group.

TagResource

array<object>

The tag resource.

object

TagValue

string

The tag value.

dev

ResourceType

string

The resource type. The value is fixed as ALIYUN::ELASTICSEARCH::INSTANCE.

ALIYUN::ELASTICSEARCH::INSTANCE

ResourceId

string

The resource ID.

es-cn-oew1q8bev0002****

TagKey

string

The tag key.

env

Examples

Success response

JSON format

{
  "PageSize": 1,
  "RequestId": "F99407AB-2FA9-489E-A259-40CF6D******\t",
  "Headers": {
    "X-Total-Count": 10
  },
  "TagResources": {
    "TagResource": [
      {
        "TagValue": "dev",
        "ResourceType": "ALIYUN::ELASTICSEARCH::INSTANCE",
        "ResourceId": "es-cn-oew1q8bev0002****",
        "TagKey": "env"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.