All Products
Search
Document Center

Function Compute:Configure tags

Last Updated:Sep 29, 2025

Function Compute lets you group function resources that serve the same purpose using tags. This makes it easier to search for and aggregate resources. You can also use tags to group functions and grant different permissions to different roles for each function group. This topic describes how to use tags, the limits on tags, and how to manage tags in the Function Compute console.

Usage notes

  • A many-to-many relationship exists between tags and function resources.

  • Each tag consists of a key-value pair.

  • A tag can be used as a condition for authorization to implement granular access control over a specific scope of resources.

  • Resources associated with a function, such as versions, aliases, and triggers, inherit the tags of the function.

    • Tag-based authentication is supported for any API call that specifies a function.

    • Different versions of a function use the same tags. This means that when you modify a tag, the change affects tag-based authentication for all versions and aliases of the function.

Limits

  • A tag key can be up to 64 Unicode characters in length and is case-sensitive.

  • A tag value can be up to 128 Unicode characters in length and is case-sensitive.

  • Each resource can have a maximum of 20 tags.

  • A tag key can contain ASCII characters, digits, Chinese characters, and the following special characters: -\.!@#$%?/^&*)(+={}[\\]",'<>~·`:;|_. A tag key cannot contain Chinese punctuation marks, start with aliyun or acs:, contain http:// or https://, or be an empty string.

  • A tag value can contain ASCII characters, digits, Chinese characters, and the following special characters: -\.!@#$%?/^&*)(+={}[\\]",'<>~·`:;|_. A tag value cannot contain Chinese punctuation marks, http://, or https://. It can be an empty string.

  • Tag information is not shared across regions. For example, a tag created in the China (Hangzhou) region is not visible in the China (Shanghai) region.

Attach tags to a function

You can attach tags when you create a new function or configure tags for an existing function.

  1. Log on to the Function Compute console. In the left-side navigation pane, click Functions.

  2. In the top menu bar, select a region. Then, on the Function List page, find the target function.

  3. In the Tag column for the target function, hover over the image icon and click Attach in the tooltip. In the Edit Tag dialog box that appears, enter a Tag Key and Tag Value, and then click Confirm.

    After a tag is added, you can hover over the tag icon in the Tags column of the target function to view the newly added tag. You can also update or delete tags as needed by following the on-screen instructions in the console.

Important

If the target function was created in the Function Compute 2.0 console and its name contains a $ symbol, you cannot attach tags to it in the 3.0 console. Follow the on-screen instructions and click the hyperlink to go to the service in the 2.0 console to attach tags.

image

Use case

An enterprise uses an Alibaba Cloud account to create multiple functions. These functions must be grouped by business and assigned to different teams. Each team must be able to view and manage only their assigned functions. In this scenario, you can use tags to group functions and manage permissions.