Function Compute allows you to classify service resources with the same functions 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. In this way, you can quickly filter out 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.
- 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 parameter 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.
- A key can contain a maximum of 64 case-sensitive Unicode characters.
- A value can contain a maximum of 128 case-sensitive Unicode characters.
- 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 old value.
- Each resource can have a maximum of 20 tags.
- A key cannot start with aliyun or acs:, contain http:// or https://, or be left unspecified.
- A value cannot contain http:// or https://, or be left unspecified.
- Tags are region-specific and cannot be used across regions. For example, in the China (Shanghai) region, you cannot view tags created in the China (Hangzhou) region.