You can create, view, and delete the service-linked role for Resource Group to enable authorized access across services.
Overview
A service-linked role is a Resource Access Management (RAM) role whose trusted entity is an Alibaba Cloud service. Service-linked roles enable authorized access across services. The following table describes the service-linked role for Resource Group.
| Service-linked role | Service identifier | Permission policy |
| AliyunServiceRoleForResourceGroup | resourcegroup.resourcemanager.aliyuncs.com | AliyunServiceRolePolicyForResourceGroup |
For more information, see Service-linked roles.
Scenarios
Resource Group assumes the service-linked role to implement the Transfer Associated Resources feature, which transfers the resources associated with a specific resource to a resource group together with that resource.
Create the service-linked role
The service-linked role is automatically created when you enable the Transfer Associated Resources feature. For more information, see Configure transfer rules.
View the information about the service-linked role
After the service-linked role is created, log on to the RAM console, go to the Roles page, and search for AliyunServiceRoleForResourceGroup. You can then view the following information on the role details page:
- Basic information
The Basic Information section displays the role name, creation time, Alibaba Cloud Resource Name (ARN), and description.
- Permission policy
On the Permissions tab, click the policy name to view the policy document.
Note You cannot view the permission policy that is attached to a service-linked role on the Policies page of the RAM console. You can view the permission policy only on the role details page. - Trust policy
On the Trust Policy Management tab, you can view the trust policy attached to the role. A trust policy defines the trusted entities of a RAM role. The trusted entity of a service-linked role is a cloud service. Check the
Servicefield in the trust policy to identify the trusted entity.
For more information, see View a RAM role.
Delete the service-linked role
When you disable the Transfer Associated Resources feature, the service-linked role is automatically deleted. For more information, see Transfer associated resources.