All Products
Search
Document Center

Serverless App Engine:ListTagResources

Last Updated:Oct 21, 2026

Queries the mapping between applications and tags.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sae:ListTagResources

get

*All Resource

*

None None

Request syntax

GET /tags HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-beijing

ResourceType

string

Yes

The resource type. Only application is supported.

application

NextToken

string

No

The pagination token. A single query returns up to 50 results. If the total number of results exceeds 50, a NextToken is returned. You can use this token in the next query to retrieve the remaining results.

A2RN

ResourceIds

string

No

The resource IDs. You can specify multiple resource IDs separated by commas (,). This parameter is required if you do not specify the Tags parameter.

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

Tags

string

No

The tag key-value pairs. This parameter is required if you do not specify the ResourceIds parameter.

  • key: the tag key. The value must be 1 to 128 characters in length.

  • value: the tag value. The value must be 1 to 128 characters in length.

Tag keys and values are case-sensitive. If you specify multiple tags, multiple tags are created and bound to the specified resource at the same time. A tag key on a resource can map to only one tag value. If you add a tag with an existing key, the tag value is updated to the new value.

The key and value cannot start with aliyun or acs:, and cannot contain http:// or https://.

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

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The request ID.

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

Message

string

The additional information.

  • If the request is successful, success is returned.

  • If an exception occurs, a specific error code is returned.

success

TraceId

string

The trace ID. You can use this ID to precisely query the call information.

0bc5f84e15916043198032146d****

Data

object

The returned data.

NextToken

string

The pagination token. A single query returns up to 50 results. If the total number of results exceeds 50, a NextToken is returned. You can use this token in the next query to retrieve the remaining results.

""

TagResources

array<object>

The mapping between applications and tags.

object

The returned data.

ResourceType

string

The resource type. Only application is supported.

ALIYUN::SAE::APPLICATION

TagValue

string

The tag value.

v1

ResourceId

string

The application ID.

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

TagKey

string

The tag key.

k1

ErrorCode

string

The error code.

  • If the request is successful, the ErrorCode parameter is not returned.

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

InvalidParameter.Obviously

Code

string

The API status code or POP error code. Valid values:

  • 2xx: Success.

  • 3xx: Redirect.

  • 4xx: Request error.

  • 5xx: Server error.

200

Success

boolean

Indicates whether the mapping between applications and tags was successfully queried. Valid values:

  • true: The query was successful.

  • false: The query failed.

true

Examples

Success response

JSON format

{
  "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": "InvalidParameter.Obviously",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter.Obviously The specified parameter is invalid {%s}. Invalid parameter {%s}.
400 InvalidResourceType.NotFound The specified resource type is not supported. The specified resource type is not supported.
400 NumberExceed.Tags The specified parameter Tags count exceed. The resource tags have reached the upper limit.
400 Invalid.Param.Tag.Scope The specified parameter is invalid: tag scope. The scope parameter is invalid.
400 No.Permission The account has no permission. The account does not have the operation permission.
400 NumberExceed.ResourceIds The number of resource IDs cannot exceed 50. The number of resource IDs cannot exceed 50.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.