Resource groups are used to group your resources based on usage, permissions, and regions, so that you can manage the resources in a hierarchical manner based on users and projects. Each resource can belong to a single resource group. The correlation between resources does not change after they are added to resource groups.

Background information

Resource groups have the following limits:
  • The following resources can be managed in resource groups: instances, disks, images, ENIs, security groups, and key pairs.
  • Resources cannot be transferred between resource groups across accounts.
Note the following points when you use resource groups:
  • A resource group can contain resources from different regions. For example, Resource Group A can contain instances from the China (Beijing) and China (Hangzhou) regions.
  • If resources that belong to different resource groups in the same account are located within the same region, these resources can be correlated with each other. For example, an instance in the China (Beijing) region of Resource Group A can be added to a VPC in the China (Beijing) region of Resource Group B.
  • Resource groups inherit the global permissions of their corresponding RAM users. If you authorize a RAM user to manage all Alibaba Cloud resources in your Alibaba Cloud account, all resource groups in your Alibaba Cloud account are accessible to in the RAM user.

Scenarios

Resource groups can be used in the following scenarios:

Scenario 1: Group resources based on their usage

You can add instances from the production environment to the resource group of the production environment. You can add instances from the test environment to the resource group of the test environment. To test a service, we recommend that you perform operations on instances only within the resource group of the test environment to prevent incorrect operations on instances within the production environment. Before you release a service, you can perform operations on instances within the resource group of the production environment to ensure that the service functions properly.

  1. Create the following resource groups: Test Environment and Production Environment. For more information, see Create a resource group.
  2. Set the same administrator for the Test Environment and Production Environment resource groups. For more information, see Add RAM authorization.
  3. Create instances TestEnv1 and TestEnv2.
    When you create these instances, select Test Environment from the Resource Group drop-down list on the Grouping page. For more information, see Create an instance by using the provided wizard.
  4. Create instances ProdEnv1 and ProdEnv2.
    When you create these instances, select Production Environment from the Resource Group drop-down list on the Grouping page. For more information, see Create an instance by using the provided wizard.
  5. Log on to the ECS console as the administrator of the Test Environment and Production Environment resource groups.
  6. In the upper-left corner of the page that appears, click Account's all Resources.
    You can see both the Test Environment and Production Environment resource groups in the drop-down list.
  7. Click Test Environment.
    Only instances that belong to the Test Environment resource group are displayed on the Instances page.

Scenario 2: Manage users and their permissions based on resource groups

You can add instances used by different departments within your company to different resource groups and set different administrators to manage these instances based on departments. In this topic, an IT department and a finance department are used as examples.

  1. Create the following resource groups: IT Department and Finance Department. For more information, see Create a resource group.
  2. Set different administrators for the IT Department and Finance Department resource groups. For more information, see Add RAM authorization.
  3. Create instances IT1 and IT2.
    Select IT Department from the Resource Group drop-down list on the Grouping page. For more information about how to create an instance, see Create an instance by using the provided wizard.
  4. Create instances Finance1 and Finance2.
    Select Finance Department from the Resource Group drop-down list on the Grouping page. For more information about how to create an instance, see Create an instance by using the provided wizard.
  5. Log on to the ECS console as the administrator of the IT Department.
  6. In the upper-left corner of the page that appears, click Account's all Resources.
    Only the IT Department resource group is displayed.
  7. Click IT Department.
    All instances that belong to the IT Department resource group are displayed on the Instances page.

Other scenarios

For more information about other application scenarios of resource groups, see Use RAM to create and authorize resource groups.