Serverless App Engine (SAE) provides the tag feature for applications. You can create and bind tags to applications that are hosted on SAE, and manage the split bills of your enterprise based on the tags. This topic describes how to specify tags for an application and view the split bills of your enterprise by tag.
Prerequisites
The following preparations must be completed before you use the tag feature to manage split bills. For more information, see Preparations.
Activate SAE and grant permissions to an Alibaba Cloud account, create a namespace, and create a virtual private cloud (VPC). You can also grant permissions to a RAM user. Before you can use a RAM user to view split bills, you must use an Alibaba Cloud account to grant the AliyunBBSReadOnlyAccess permission to the RAM user. Then, you can use the RAM user to view bills in the Expenses and Costs console and view resource plan usage on the Overview page in the SAE console.
An application is deployed on SAE. For more information, see Deploy a Java application to SAE 1.0.
Background information
You can use tags to manage, group, and classify resources. This way, you can quickly search for resources and perform batch operations on the resources. Examples:
Environment isolation: You can add different tags to different environments (such as production environments and test environments), operating systems (such as Windows Server and Linux), or client platforms (such as iOS and Android).
Project management: You can add tags, such as CostCenter:aliyun, to groups, projects, or departments. Then, you can classify the objects and configure itemized billing based on the tags.
To split SAE bills, perform the following steps:
Define tags for resources (applications) based on the organization or business dimension. This step is labeled 1 in the preceding figure.
Log on to the SAE console and bind tags to applications. This step is labeled 2 in the preceding figure.
Log on to the Expenses and Costs console to view bills. This step is labeled 3 in the preceding figure.
Usage notes
Each tag consists of a key and a value.
Each tag key must be unique in a resource.
Tag information is not shared across regions.
If a tag is no longer bound to a resource after you unbind the tag, the tag is automatically deleted.
Step 1: Configure tags for an application
Method 1: Configure tags for an application on the Applications page
Log on to the SAE console, find the application that you want to manage, and then click the icon.
In the Edit Tag panel, click Add, specify Tag Key and Tag Value, and then click OK.
After the tag is configured, you can click the icon in the Tag column of the application on the Applications page to view the tag.
Method 2: Configure tags for an application on the Basic Information page
Log on to the SAE console. Click the name of the desired application to go to the Basic Information page.
On the Basic Information page of the application, click Edit Tag in the Application Information section.
In the Edit Tag dialog box, click Add, specify Tag Key and Tag Value, and then click OK.
After the tag is configured, you can view the tag in the Application Information section of the Basic Information page.
You can add up to 20 tags to each application. A maximum of 20 tags can be bound or unbound at a time.
You can add or delete tags in the Edit Tag panel.
Step 2: View bills in the Expenses and Costs console
1. Enable cost allocation tags
The cost allocation tag feature is never enabled
Log on to the Expenses and Costs console. On the Cost allocation tags page, click Next.
In the Select tags that you want to enable section, search for and add a Tag Key based on your business requirements and click Next.
Click Enable. In the Remind message, click OK.
The cost allocation tag feature is enabled
Log on to the Expenses and Costs console. On the Cost allocation tags page, enter a tag in the Tag Key field and click Search. In the search result section, find the tag that you want to enable and click Enable in the Operations column.
NoteTo enable multiple tags at a time, select the tags that you want to enable and click Batch Enable.
Tags are case-sensitive.
SAE automatically binds the system tag acs:sae:namespace to the applications that are created or redeployed on and after March 13, 2023. The system tag is not displayed in the SAE console. You must enable the system tag in the Expenses and Costs console.
2. Allocate resources to cost centers by tag
On the Cost Centers page, click the + icon to add a cost center.
In the Add Cost Center dialog box, enter a cost center name and click OK.
On the All Resources tab, select the desired tags and click Allocate.
In the Allocate dialog box, select a cost center from the drop-down list and click OK.
3. View billing data
Enable the split bill feature.
On the Split Bill page, click the icon in the Cost Center column to filter billing data based on the configured cost centers.
NoteYou can also click the icon in the upper-right corner of the Split Bill page to export billing data in the CSV format.