In a resource directory, the vSwitches in a virtual private cloud (VPC) within a member account (resource owner) can be shared with another member account (shared target). This topic describes how a resource owner shares vSwitches with other member accounts.

Limits

Make sure that you understand the limits on shared VPCs. For more information, see Limits.

Step 1: Use a resource directory to manage multiple accounts

An Alibaba Cloud resource directory allows you to create member accounts in it or invite accounts to join it as member accounts. This way, you can manage the member accounts within the resource directory in a centralized manner. You must use the enterprise management account of your resource directory to perform the following steps:

  1. Enable a resource directory.
    For more information, see Enable a resource directory.
  2. Create folders based on the organizational structure of your enterprise.
    For more information, see Create a folder.
  3. Create member accounts or invite accounts.

Step 2: Create a resource share as the resource owner

Create a resource share in the Resource Management console. Then, add the VPC resources that you want to share and the accounts with which you want to share the resources to the resource share.

  1. Create a resource share. Then, add the VPC resources that you want to share and the accounts with which you want to share the resources to the resource share.
    1. Log on to the Resource Management console.
    2. In the left-side navigation pane, choose Resource Sharing > Resources I Share.
    3. In the top navigation bar, select the region where the VPC that you want to share is deployed.
    4. On the page that appears, click Create Resource Share.
    5. On the Create Resource Share page, enter a name for the resource share in the Resource Share Name field. For example, you can enter Finance_VPC.
    6. In the Select Shared Resource section, select the resource type and resource IDs, and click Add. For example, you can select the vSwitch type and select the ID vsw-bp183p93qs667muql****.
    7. In the Select Shared Target section, enter the ID of each Alibaba Cloud account with which you want to share the selected resources, and click Add. For example, you can enter 177242285274****.
    8. Click OK.
  2. View the details about the newly created resource share.
    1. On the page that appears, view the following information of the newly created resource share: Resource Share ID/Name, Status, and Creation Time.
      If the resource share is in the Enabled state, it is created.Status of the resource share
    2. Click the ID of the resource share to view its detailed information.
      If Associated is displayed in the Status columns of the Shared Resources and Shared Target sections, the resources that you want to share and the accounts with which you want to share the resources are added to the resource share.Details
  3. Optional. Modify the information of the resource share.

    On the details page of the resource share, you can click Edit in each section to change the resource share name, add or remove shared resources, or add or remove shared targets. For more information, see Change the name of a resource share, Add or remove a shared resource, or Add or remove a shared target.

Step 3: View and use the shared vSwitches as a shared target

By default, after the resource owner shares a vSwitch, a shared target can use the shared vSwitch without confirmation. Shared targets can view the vSwitches that other accounts share with them. They can also create cloud resources, such as Elastic Compute Service (ECS) instances, Server Load Balancer (SLB) instances, and ApsaraDB RDS instances, in the shared vSwitches.

  1. Log on to the Resource Management or VPC console to view the shared vSwitches. In this example, the member account 177242285274**** is used to log on to the VPC console to view the shared vSwitch vsw-bp183p93qs667muql****.
    Note For more information about how to view shared vSwitches, see View shared vSwitches.
    View shared vSwitches
    Note If a resource owner shares vSwitches, the VPC console generates records for shared VPCs, route tables, and vSwitches due to network requirements.
  2. In the VPC console, change the name and description of the shared VPC, route table, and vSwitch.
    Note The preceding information is exclusive to you and cannot be viewed or changed by the resource owner.
    Modify vSwitch information
  3. Create a cloud resource in the shared vSwitch.
    1. On the VSwitches page, find the shared vSwitch, move the pointer over Create in the Actions column, and select the type of resource that you want to create.
      For more information, see the following topics:
      Note You can also create cloud resources in the consoles of the related Alibaba Cloud services. When you configure networks for the resources, select the shared vSwitch.
    2. View the cloud resource that is created in the shared vSwitch.
      Shared targets can view the cloud resources that are created in the shared vSwitches in the VPC console or in the consoles of the related Alibaba Cloud services. The following figure shows the cloud resource that is created in the shared vSwitch in the VPC console.View the cloud resource that is created in the shared vSwitch