A resource owner can share resources with a principal regardless of whether the resource owner or principal is the management account or a member of a resource directory.
Scenarios
A resource owner can share resources with an account in the following scenarios:
An Alibaba Cloud account that is not the management account or a member of a resource directory can share resources with another Alibaba Cloud account that is not the management account or a member of a resource directory.
The management account or a member of a resource directory can share resources with an Alibaba Cloud account that is not the management account or a member of the resource directory.
The management account or a member of a resource directory can share resources with all members in the resource directory, all members in a specific folder in the resource directory, or a specific member in the resource directory.
ImportantResource sharing across resource directories is not supported.
In this example, Alibaba Cloud account A shares one or more vSwitches within the account with Alibaba Cloud account B. Alibaba Cloud accounts A and B are not the management account or members of a resource directory.
Step 1: Create a resource share
Use Alibaba Cloud account A to create a resource share, add the vSwitches that need to be shared with Alibaba Cloud account B to the resource share, and then add Alibaba Cloud account B to the resource share as a principal.
Log on to the Resource Management console by using Alibaba Cloud account A.
In the left-side navigation pane, choose Resource Sharing > Resources I Share.
In the top navigation bar, select the region where the resources to be shared reside.
Click Create Resource Share. On the page that appears, configure the parameters.
Configure basic information and add resources.
Enter a resource share name, add tags to the resource share based on your business requirements, and then add select resources to be shared. In this example, vSwitches are selected for sharing.
Add permissions.
The permissions define the operations that principals can perform on the resources. In this example, the AliyunRSDefaultPermissionVSwitch permission is added. You can click the permission name to view the permission details.
Add principals.
Set Principal Scope to All Accounts and Principal Type to Alibaba Cloud Account, and enter an account ID in the Principal ID field. In this example, the ID of Alibaba Cloud account B is entered.
Confirm the configurations and click OK.
Step 2: Accept the resource sharing invitation
Use Alibaba Cloud account B to accept the resource sharing invitation initiated by Alibaba Cloud account A.
Log on to the Resource Management console by using Alibaba Cloud account B.
In the left-side navigation pane, choose Resource Sharing > Resources Shared To Me.
In the top navigation bar, select the region where the resources to be shared reside.
Click Accept in the Status column of the resource share.
In the Accept Resource Sharing Invitation dialog box, click Accept.
If you share multiple resources with the same principal (Alibaba Cloud account B) in a resource share, the principal only needs to accept the invitation once.
Step 3: Verify the result
You can use one of the following methods to check whether resources are successfully shared:
Resource owner (Alibaba Cloud account A)
On the details page of the resource share in the Resource Management console, view the status of the resources and principal. If they are in the Associated state, resources are successfully shared.


Principal (Alibaba Cloud account B)
In the console of the Alibaba Cloud service to which the resources belong, view and manage the resources. In this example, you can log on to the Virtual Private Cloud (VPC) console and view the vSwitches that are shared.
