A Resource Owner can share resources with any Principal, regardless of whether the Resource Owner or the Principal is a member of a Resource Directory.
Use cases
You can share resources with any account in the following scenarios:
-
An account outside any resource directory can share resources with another account outside any resource directory.
-
A management account or directory member can share resources with an external Alibaba Cloud account.
-
A management account or directory member can share resources with all directory members, members in a specific folder, or a specific member.
ImportantResource sharing across resource directories is not supported.
This topic shows how to share a vSwitch from Alibaba Cloud Account A with Alibaba Cloud Account B when neither account is in a Resource Directory.
Step 1: Create a Resource Share
Use Alibaba Cloud Account A to create a Resource Share, add the vSwitch to be shared, and specify Alibaba Cloud Account B as the Principal.
-
Log on to the Resource Management console with Alibaba Cloud Account A.
-
In the left-side navigation pane, choose Resource Sharing > Resources I Share.
-
In the upper-left corner of the top navigation bar, select the region where the resource is located.
-
Click Create Resource Share and configure the resource share settings.
-
Configure basic information and add a resource.
Enter a name for the Resource Share, add a Tag to it as needed, and then add the resource to be shared. In this example, the resource is a vSwitch.
-
Associate a permission.
This permission specifies the actions that the principal can perform on the shared resource. For this example, select AliyunRSDefaultPermissionVSwitch. You can click the permission name to view its details.
-
Associate a Principal.
Set Principal Scope to All Accounts, set Principal Type to Alibaba Cloud Account, and then enter the principal's account ID. In this example, enter the ID of Alibaba Cloud Account B.
-
Review and submit.
-
Step 2: Accept the resource sharing invitation
Alibaba Cloud Account B accepts the invitation from Alibaba Cloud Account A to share the vSwitch.
-
Log on to the Resource Management console with Alibaba Cloud Account B.
-
In the left-side navigation pane, choose Resource Sharing > Resources Shared To Me.
-
In the upper-left corner of the top navigation bar, select the region where the shared resource is located.
-
Find the resource share and click Accept in the Status column.
-
In the Accept Resource Sharing Invitation dialog box, click OK.
If a single Resource Share contains multiple resources, the Principal only needs to accept the invitation once.
Step 3: Verify the result
You can use either of the following methods to verify that the resource was shared successfully:
-
Resource Owner (Alibaba Cloud Account A)
On the resource share details page in the Resource Management console, check the sharing status. Sharing is successful when the status of both the resource and the principal is Associated.
-
Principal (Alibaba Cloud Account B)
View and manage the shared resource in the console of the corresponding service. In this example, log on to the VPC console to view the shared vSwitch.
In the list, the shared vSwitch has the Shared tag. In the Actions column, click Add Cloud Product to use the vSwitch.