Function Compute allows you to classify service resources that have the same features by using tags. Tags facilitate resource search and aggregation.


Using tags to group and classify an increasing number of services facilitates resource search and aggregation.

  • You can attach different tags to services in different environments, such as the production environment and the test environment. For example, you can attach the Env:Test key-value pair to all services in the test environment. This way, you can efficiently filter services to obtain the services that meet the specified conditions.
  • You can attach tags to services by group, project, or department to facilitate team or project management. For example, you can use the FinanceDept:FinanceJoshua tag to implement group-based authorization. For more information, see Use tags to perform group-based service authorization.

Usage notes

  • Tags and service resources are in an N-to-N relationship.
  • Each tag consists of a key-value pair.
  • A tag serves as a condition to implement fine-grained authorization on resources within a specified scope.
  • All resources of a service, such as versions, aliases, functions, and triggers, inherit the tag attached to this service.
    • Tag-based authorization is supported if you specify the service in your API request.
    • Different versions of a service use the same tag. Therefore, a change to the tag of a service affects tag-based authorization that involve all versions and aliases of the service.


  • Each tag key must be 1 to 64 case-sensitive Unicode characters in length.
  • Each tag value must be 1 to 128 case-sensitive Unicode characters in length.
  • Each tag key on a resource can have only one value. If you add a tag that has the same key as an existing tag on a resource, the new value overwrites the original value.
  • Each resource can have a maximum of 20 tags.
  • A tag key cannot start with aliyun or acs:, contain http:// or https://, or be an empty string.
  • A tag value cannot contain http:// or https://, or be an empty string.
  • Tags cannot be used across regions. For example, tags created in the China (Hangzhou) region are invisible in the China (Shanghai) region.