All Products
Search
Document Center

Resource Management:Service-linked role for Resource Sharing

Last Updated:Jun 16, 2026

The service-linked role AliyunServiceRoleForResourceSharing enables Resource Sharing to access the organizational structure of your resource directory for organization-based resource sharing.

Scenarios

Resource Sharing uses the AliyunServiceRoleForResourceSharing role to obtain the organizational structure of a resource directory and share resources based on that structure.

For more information, see Service-linked roles.

Permission description

Role name: AliyunServiceRoleForResourceSharing

Policy: AliyunServiceRolePolicyForResourceSharing

Permissions: Allows Resource Sharing to access the organizational structure of your resource directory.

 {
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "resourcemanager:GetResourceDirectory",
                "resourcemanager:GetFolder",
                "resourcemanager:ListFoldersForParent",
                "resourcemanager:ListAccountsForParent",
                "resourcemanager:ListAccounts"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": "ram:DeleteServiceLinkedRole",
            "Resource": "*",
            "Effect": "Allow",
            "Condition": {
                "StringEquals": {
                    "ram:ServiceName": "resourcesharing.aliyuncs.com"
                }
            }
        }
    ]
}

Create the service-linked role

When you enable resource sharing, the system automatically creates the AliyunServiceRoleForResourceSharing role. For more information, see Enable resource sharing.