All Products
Search
Document Center

Express Connect:ListTagResources

Last Updated:Mar 18, 2025

Queries a list of tags that are added to an Express Connect router (ECR).

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
expressconnectrouter:ListTagResourcesnone
*ExpressConnectRouter
acs:expressconnectrouter::{#accountId}:expressconnectrouter/{#EcrId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceTypestringYes

The resource type. Set the value to EXPRESSCONNECTROUTER.

EXPRESSCONNECTROUTER
ResourceIdarrayYes

The ECR IDs.

ResourceIdstringYes

The ECR ID.

You can specify up to 50 ECR IDs.

ecr-kgzj75zpq50hqz****
Tagarray<object>No

The tag.

You can specify at most 20 tags.

TagModelobjectNo

The tag.

KeystringNo

The tag key.

The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

You can specify up to 20 tag keys in each call.

TestKey
ValuestringNo

The tag value. The tag value can be up to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with acs: or aliyun. The tag value can be an empty string.

You can specify up to 20 tag values in each call.

TestValue
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • You do not need to specify this parameter for the first request.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****
MaxResultsintegerNo

The maximum number of entries to return for a single request. Default value: 20.

20

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

6FABF516-FED3-5697-BDA2-B18C5D9A****
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
True
Codestring

The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.

200
Messagestring

The returned message.

OK
TagResourcesarray<object>

The tags.

TagResultModelListobject
ResourceIdstring

The resource ID.

ecr-897j0jooxyr1aq****
ResourceTypestring

The resource type. The value is EXPRESSCONNECTROUTER.

EXPRESSCONNECTROUTER
TagKeystring

The tag key.

TestKey
TagValuestring

The tag value.

TestValue
TotalCountinteger

The total number of records that meet the query conditions.

2
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

  • If NextToken is empty, no next page exists.
  • If a value of NextToken is returned, the value indicates the token that is used for the next query.
AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****
MaxResultsinteger

The number of entries per page.

20

Examples

Sample success responses

JSONformat

{
  "RequestId": "6FABF516-FED3-5697-BDA2-B18C5D9A****",
  "Success": true,
  "Code": "200",
  "Message": "OK",
  "TagResources": [
    {
      "ResourceId": "ecr-897j0jooxyr1aq****",
      "ResourceType": "EXPRESSCONNECTROUTER",
      "TagKey": "TestKey",
      "TagValue": "TestValue"
    }
  ],
  "TotalCount": 2,
  "NextToken": "AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****",
  "MaxResults": 20
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-09-05The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-06-28API Description UpdateView Change Details