All Products
Search
Document Center

Microservices Engine:ListTagResources

Last Updated:Jul 25, 2024

Queries tagged resources.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • 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 Key: the condition key that is defined by the cloud service.
  • 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.
OperationAccess levelResource typeCondition keyAssociated operation
mse:ListTagResourcesget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region.

cn-hangzhou
NextTokenstringNo

The token used to start the next query.

AAAAAV3MpHK1AP0pfERHZN5pu6kywps2Ezza3n8HAAzCCqsi
ResourceTypestringYes

The type of the resource. 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
Tagarray<object>No

The list of tags. A maximum number of 20 tags are supported.

objectNo

The key-value pair of a tag.

KeystringNo

The key of the tag.

env
ValuestringNo

The value of the 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 was successfully processed.
ErrorCodestring

The error code returned if the request failed.

mse-100-000
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
TagResourcesarray<object>

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 the resource.

mse-cn-7pp2st29t16
ResourceTypestring

The type of the resource.

cluster
TagValuestring

The tag value.

prd
TagKeystring

The tag key.

env

Examples

Sample success responses

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 status codeError codeError messageDescription
400duplicatedClusterAliasNameduplicated cluster alias nameThe instance name is duplicate. User another name.
400illegalRequestillegal request:%sInvalid request: %s
403NoPermissionYou are not authorized to perform this operation:%sYou do not have the permission to use this interface:%s
404clusterNotFoundcluster not foundThe cluster is not found.
500systemErrorsystem errorAn error occurred on the system. Try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-08-30Add OperationView Change Details