All Products
Search
Document Center

Serverless App Engine:Split bills

Last Updated:Jan 18, 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 Billing Management 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 demo application on SAE.

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 ① in the preceding figure.

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

  3. Log on to the Billing Management to view bills. This step is labeled ③ 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 application tags

  1. Log on to the SAE console.

  2. In the left-side navigation pane, click Applications. In the top navigation bar, select a region. Then, click the name of an application.

  3. Go to the Edit Tag panel or dialog box.

    If you have a large number of applications, you can filter applications by Application Name, Application ID, SLB IP, or Instance IP Address on the Applications page. Then, enter the corresponding value and click the bt_search_application icon to search for the application that you want to manage.编辑标签

    • Go to the Edit Tag panel from the Applications page.

      On the Applications page, find the application that you want to manage, move the pointer over the 标签 icon in the Tag column, and then click Edit Tag in the bubble chart.

    • Go to the Edit Tag dialog box from the Basic Information page.

      1. In the left-side navigation pane, click Applications. On the Applications page, click the name of the application to go to the Basic Information page.

      2. In the Application Information section on the Basic Information tab, click Edit Tag in the Application Tag field.

  4. In the Edit Tag panel or dialog box, manage tags based on your business requirements.

    • Add: Click Add, configure the Tag Key and Tag Value parameters, and then click OK.

      Note
      • You can click Add to add multiple tags to the application.

      • You can add up to 20 tags to each application.

      • You can add or remove up to 20 tags at a time.

    • Delete: Find the key-value pair that you want to delete, click the bt_delete_label icon next to the key-value pair, and then click OK.

      Note

      If you delete the key-value pair of a tag, the tag is deleted.

    • Edit: Find the key-value pair that you want to modify, configure the Tag Key and Tag Value parameters, and then click OK.

  5. Verify the result.

    • Verify the result on the Applications page.

      1. On the Applications page, find the application that you want to manage, move the pointer over the 标签 icon in the Tag column, and then view tags in the bubble chart.

      2. Optional. Click Edit Tag in the bubble chart. In the Edit Tag panel, view the tag details.

    • Verify the result on the Basic Information page.

      1. In the left-side navigation pane, click Applications. On the Applications page, click the name of the application to go to the Basic Information page.

      2. In the Application Information section on the Basic Information tab, click Edit Tag in the Application Tag field. In the Edit Tag dialog box, view the tag details.

Step 2: View bills in the Billing Management console

  1. Log on to the Billing Management console.

  2. In the left-side navigation pane, choose Cost Management > Cost allocation tags to enable cost collection tags.

    • If the cost allocation tag feature is not enabled, perform the following steps to enable tags:bt_enable_tagging_fees(next)

      1. On the Cost allocation tags page, click Next.

      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.

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

    • If the cost allocation tag feature is enabled, perform the following steps to enable tags:sc_enable_tagging_fees_for_acs_sae_namespace

      1. On the Cost allocation tags page, enter a tag in the Tag Key field and click Search.

      2. In the search result section, find the tag that you want to enable and click Enable in the Operations column.

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

    Important
    • 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 Billing Management console.

  3. Allocate the tags to cost centers.

    1. In the left-side navigation pane, choose Manage Split > Cost Center.

    2. In the left-side navigation pane of the Cost Centers page, click the plus icon next to Cost Center. In the Add Cost Center dialog box, enter a name and click OK.bt_add_new_cost_unit

    3. In the left-side navigation pane of the Cost Centers page, click All Resources.sc_assign_resource_by_tag

    4. Click the filter icon in the Tag column of the tag list. In the search box that appears, select the enabled tags and click OK.

    5. In the Operations column of the tag list, click Allocate. In the Allocate dialog box, select a cost center from the Please Select drop-down list and click OK.

  4. View billing data.sc_view_fees_result

    1. In the left-side navigation pane, choose Manage Split > Split Bill.

    2. On the Split Bill page, click the filter icon in a column of the billing table based on your business requirements. For example, click the filter icon in the Cost Center column to filter billing data based on the configured cost centers.

      On the Split Bill page, view the billing data. You can also click Export Billing Overview (CSV) in the upper-right corner to view billing data.