All Products
Search
Document Center

Serverless App Engine:ListTagResources

Last Updated:Dec 17, 2025

Queries the mapping relationships between applications and tags.

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
sae:ListTagResourcesget
*All Resources
*
    none
none

Request syntax

GET /tags HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-beijing
ResourceTypestringYes

The type of the resource. Set the value to application.

application
NextTokenstringNo

A maximum of 50 entries can be returned for a query. If a query generates more than 50 entries, the NextToken parameter is returned with the first 50 entries. You can use the NextToken parameter value to retrieve the subsequent entries that are not returned in the current query result.

A2RN
ResourceIdsstringNo

The resource ID. Separate multiple resource IDs with comma (,). This parameter is required if you do not specify the Tags parameter.

["d42921c4-5433-4abd-8075-0e536f8b****"]
TagsstringNo

The tag in the format of a key-value pair. This parameter is required if you do not specify the ResourceIds parameter. The following parameters are involved:

  • key: the tag key. It cannot exceed 128 characters in length.
  • value: the tag value. It cannot exceed 128 characters in length.

Tag keys and tag values are case-sensitive. If you specify multiple tags, the system adds all the tags to the specified resources. Each tag key on a resource can have only one tag value. If you create a tag that has the same key as an existing tag, the value of the existing tag is overwritten.

Tag keys and tag values cannot start with aliyun or acs:, and cannot contain http:// or https://.

[{"key":"k1","value":"v1"}]

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The request ID.

7414187F-4F59-4585-9BCF-5F0804E4****
Messagestring

The returned message. Valid values:

  • success: If the call is successful, success is returned.
  • An error code: If the call fails, an error code is returned.
success
TraceIdstring

The trace ID that is used to query the details of the request.

0bc5f84e15916043198032146d****
Dataobject

The returned data.

NextTokenstring

A maximum of 50 entries can be returned for a query. If a query generates more than 50 entries, the NextToken parameter is returned with the first 50 entries. You can use the NextToken parameter value to retrieve the subsequent entries that are not returned in the current query result.

""
TagResourcesarray<object>

The mapping relationships between applications and tags.

TagResourceobject
ResourceTypestring

The type of the resource. Valid value: application.

ALIYUN::SAE::APPLICATION
TagValuestring

The value of the tag.

v1
ResourceIdstring

The ID of the application.

d42921c4-5433-4abd-8075-0e536f8b****
TagKeystring

The key of the tag.

k1
ErrorCodestring

The error code. Valid values:

  • If the call is successful, the ErrorCode parameter is not returned.
  • If the call fails, the ErrorCode parameter is returned. For more information, see the Error codes section in this topic.
Codestring

The HTTP status code. Valid values:

  • 2xx: The call was successful.
  • 3xx: The call was redirected.
  • 4xx: The call failed.
  • 5xx: A server error occurred.
200
Successboolean

Indicates whether the mapping relationships between applications and tags were queried. Valid values:

  • true: The mapping relationships were queried.
  • false: The mapping relationships failed to be queried.
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "7414187F-4F59-4585-9BCF-5F0804E4****",
  "Message": "success",
  "TraceId": "0bc5f84e15916043198032146d****",
  "Data": {
    "NextToken": "",
    "TagResources": [
      {
        "ResourceType": "ALIYUN::SAE::APPLICATION",
        "TagValue": "v1",
        "ResourceId": "d42921c4-5433-4abd-8075-0e536f8b****",
        "TagKey": "k1"
      }
    ]
  },
  "ErrorCode": "",
  "Code": 200,
  "Success": true
}

Error codes

HTTP status codeError codeError message
400InvalidParameter.ObviouslyThe specified parameter is invalid {%s}.
400InvalidResourceType.NotFoundThe specified resource type is not supported.
400NumberExceed.TagsThe specified parameter Tags count exceed.
400Invalid.Param.Tag.ScopeThe specified parameter is invalid: tag scope.
400No.PermissionThe account has no permission.
400NumberExceed.ResourceIdsThe number of resource IDs cannot exceed 50.

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

Change history

Change timeSummary of changesOperation
No change history