All Products
Search
Document Center

Serverless App Engine:Split bills

Last Updated:Nov 04, 2024

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.

dg_example_of_tag_usage_scenarios

To split SAE bills, perform the following steps:

  1. Define tags for resources (applications) based on the organization or business dimension. This step is labeled 1 in the preceding figure.

  2. Log on to the SAE console and bind tags to applications. This step is labeled 2 in the preceding figure.

  3. 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

  1. Log on to the SAE console, find the application that you want to manage, and then click the image icon.

    hr4xGXYBYC

  2. In the Edit Tag panel, click Add, specify Tag Key and Tag Value, and then click OK.

    LLTIOxX7U8

  3. After the tag is configured, you can click the image 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

  1. Log on to the SAE console. Click the name of the desired application to go to the Basic Information page.

    5UbXNB6ky5

  2. On the Basic Information page of the application, click Edit Tag in the Application Information section.

    fXa9S0mU8i

  1. In the Edit Tag dialog box, click Add, specify Tag Key and Tag Value, and then click OK.

    HEwuXtvUuh

  2. After the tag is configured, you can view the tag in the Application Information section of the Basic Information page.

    0iHhqjLhLm

Note
  • 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

  1. Log on to the Expenses and Costs console. On the Cost allocation tags page, click Next.

    LpbFnOuqXG

  2. 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.

    wwANyH225K

  3. Click Enable. In the Remind message, click OK.

The cost allocation tag feature is enabled

  1. 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.

    UuFDSipwuG

    Note

    To enable multiple tags at a time, select the tags that you want to enable and click Batch Enable.

    Note

    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

  1. On the Cost Centers page, click the + icon to add a cost center.

  2. In the Add Cost Center dialog box, enter a cost center name and click OK.

  3. On the All Resources tab, select the desired tags and click Allocate.

    NBu6BXioG2

  4. In the Allocate dialog box, select a cost center from the drop-down list and click OK.

3. View billing data

  1. Enable the split bill feature.

    IUtRAmdrMK

  2. On the Split Bill page, click the image icon in the Cost Center column to filter billing data based on the configured cost centers.

    Note

    You can also click the image icon in the upper-right corner of the Split Bill page to export billing data in the CSV format.