All Products
Search
Document Center

Microservices Engine:ListTagResources

Last Updated:Dec 02, 2022

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.
Operateaccess levelResource typeconditional keywordAssociation operation
mse:ListTagResourcesRead
    All resources
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region.

cn-hangzhou
NextTokenstringNo

The token that is required for the next query.

AAAAAV3MpHK1AP0pfERHZN5pu6kywps2Ezza3n8HAAzCCqsi
ResourceTypestringYes

The type of the resources. Valid values:

  • CLUSTER: MSE instance
  • GATEWAY: cloud-native gateway
CLUSTER
ResourceIdarrayNo

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

stringNo

The ID of a resource.

mse-cn-7pp2st29t16
TagarrayNo

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

objectNo

The key-value pair of a tag.

KeystringNo

The key of a tag.

env
ValuestringNo

The value of a tag.

prd
AcceptLanguagestringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English
zh

Response parameters

ParameterTypeDescriptionExample
object

The data structure.

NextTokenstring

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

AAAAAV3MpHK1AP0pfERHZN5pu6ng3BeUyo2zbY5wgL1DBa2T
RequestIdstring

The ID of the request.

92ED7C9C-84A2-595F-87FE-354F84C0F739
Messagestring

The message returned.

The request is successfully processed.
ErrorCodestring

The error code returned.

mse-100-000
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
TagResourcesarray

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.

ResourceIdstring

The ID of a resource.

mse-cn-7pp2st29t16
ResourceTypestring

The type of a resource.

cluster
TagValuestring

The value of a tag.

prd
TagKeystring

The key of a tag.

env

Example

Normal return example

JSONFormat

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

Error codes

Http codeError codeError message
400duplicatedClusterAliasNameduplicated cluster alias name
400illegalRequestillegal request:%s
400invalidParameterparameter error:%s
403NoPermissionYou are not authorized to perform this operation.
404clusterNotFoundcluster not found
500systemErrorsystem error
500regcenterErrorregister center error:%s

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

Change history

Change timeSummary of changesOperate
2022-08-30Add Operation