All Products
Search
Document Center

Microservices Engine:ListTagResources

Last Updated:Jan 16, 2023

Queries tagged resources.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the operation.
  • Condition keyword: refers to the condition keyword defined by the cloud product itself.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operate access level Resource type conditional keyword Association operation
mse:ListTagResources Read
    All resources
    without
without

Request parameters

Parameter Type Required Description Example
RegionId string Yes

The region ID.

cn-hangzhou
NextToken string No

The token that is required for the next query.

AAAAAV3MpHK1AP0pfERHZN5pu6kywps2Ezza3n8HAAzCCqsi
ResourceType string Yes

The type of the resources. Valid values:

  • CLUSTER: MSE instance
  • GATEWAY: cloud-native gateway
CLUSTER
ResourceId array No

The resource IDs. You can specify a maximum of 50 resource IDs.

string No

The ID of a resource.

mse-cn-7pp2st29t16
Tag array No

The list of tags. You can specify a maximum of 20 tags.

object No

The key-value pair of a tag.

Key string No

The key of a tag.

env
Value string No

The value of a tag.

prd
AcceptLanguage string No

The language of the response. Valid values:

  • zh: Chinese
  • en: English
zh

Response parameters

Parameter Type Description Example
object

The data structure.

NextToken string

The token that is required for the next query. If the NextToken parameter is empty, no subsequent query is required.

AAAAAV3MpHK1AP0pfERHZN5pu6ng3BeUyo2zbY5wgL1DBa2T
RequestId string

The ID of the request.

92ED7C9C-84A2-595F-87FE-354F84C0F739
Message string

The message returned.

The request was successfully processed.
ErrorCode string

The error code returned if the request failed.

mse-100-000
Success boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
TagResources array

The list of resources.

object

The details of a resource and its tags, including the resource ID, the resource type, and the keys and values of the tags.

ResourceId string

The ID of a resource.

mse-cn-7pp2st29t16
ResourceType string

The type of a resource.

cluster
TagValue string

The value of a tag.

prd
TagKey string

The key of a tag.

env

Example

Normal return example

JSONFormat

{
  "NextToken": "AAAAAV3MpHK1AP0pfERHZN5pu6ng3BeUyo2zbY5wgL1DBa2T",
  "RequestId": "92ED7C9C-84A2-595F-87FE-354F84C0F739",
  "Message": "The request was successfully processed.\n",
  "ErrorCode": "mse-100-000",
  "Success": true,
  "TagResources": {
    "TagResource": [
      {
        "ResourceId": "mse-cn-7pp2st29t16",
        "ResourceType": "cluster",
        "TagValue": "prd",
        "TagKey": "env"
      }
    ]
  }
}

Error codes

Http code Error code Error message
400 duplicatedClusterAliasName duplicated cluster alias name
400 illegalRequest illegal request:%s
400 invalidParameter parameter error:%s
403 NoPermission You are not authorized to perform this operation.
404 clusterNotFound cluster not found
500 systemError system error
500 regcenterError register center error:%s

For a list of error codes, visit the API error center.

Change history

Change time Summary of changes Operate
2022-08-30 Add Operation