Create a VPC-type compute resource

Updated at:

You can add Alibaba Cloud resources from a virtual private cloud (VPC) to the Data Resource Platform. This topic uses an AnalyticDB for PostgreSQL resource as an example to show you how to create a VPC-type compute resource.

Prerequisites

Background information

A virtual private cloud (VPC) is a custom private network that you create on Alibaba Cloud. Different VPCs are logically isolated from each other at Layer 2. You can create and manage cloud product instances, such as ECS, SLB, and RDS, within your VPC.

Procedure

Step 1: Obtain instance information

  1. Obtain the instance ID, port, VPC ID, database name, username, and logon password of the target instance from the AnalyticDB for PostgreSQL console.

    1. Log on to the AnalyticDB for PostgreSQL console.

    2. In the navigation pane on the left, click Instance List, switch to the correct Region in the top navigation bar, and then find the target Instance ID in the instance list.

    3. Click the Instance ID to open the instance details page.

    4. In the navigation pane on the left, click Account Management to obtain the Account for the attached database. This account is the Username that you need to enter when you create a data source.

    5. In the navigation pane on the left, click Database Connection to obtain the VPC ID, Internal Endpoint, and Port in the VPC.

  2. In the Alibaba Cloud OpenAPI Developer Portal, call the DescribeDBInstanceNetInfo operation of AnalyticDB for PostgreSQL to obtain the VPC-connected instance ID.

    1. Go to the DescribeDBInstanceNetInfo page.

      Note

      Log on to the AnalyticDB for PostgreSQL console before you call the DescribeDBInstanceNetInfo operation in the Alibaba Cloud OpenAPI Developer Portal.

    2. For Service Endpoint, select the region where your target instance resides. You can verify the region in the AnalyticDB for PostgreSQL console.

    3. On the Parameter Settings page, enter the instance ID of the target instance in the DBInstanceId field.

    4. Click Make Call, and wait for the API Call Result to appear on the right.

    5. In the API call response, VpcInstanceId is the VPC Instance ID of the target instance.

  3. Optional: Obtain the ID of the Alibaba Cloud account that owns the instance.

    1. Log on to the Alibaba Cloud account that owns the instance.

    2. Click the profile picture. The Account ID that appears is the ID of the Alibaba Cloud account.

Step 2: Create a VPC-type compute resource

  1. Log on to the Data Resource Platform console.

  2. Click the 33 icon in the upper-right corner of the page and select System Settings.

  3. In the left navigation pane, click Group Management.

  4. On the Workgroup Management page, select the target workgroup and click Cloud Computing Resources in the Actions column.

  5. On the Compute Resources page, click Create Compute Resource.

  6. In the Create Compute Resource dialog box, configure the AnalyticDB PostgreSQL parameters as described in Step 1: Obtain instance information.

    Parameter

    Description

    Compute Resource ID

    A custom ID for the AnalyticDB for PostgreSQL compute resource.

    Resource Description

    A custom description of the compute resource, including its scenarios and attributes.

    Cloud computing resource types

    Select AnalyticDB PostgreSQL from the drop-down list and click the Whitelist icon to view the IP address.

    Note

    Before you connect to the AnalyticDB for PostgreSQL data source, add the IP address to a whitelist. For more information, see Configure a whitelist.

    Is VPC Resource

    Select the network type of the resource.

    • No: Classic network.

    • Yes, it is a Virtual Private Cloud.

    The default value is No. This example uses a VPC-connected AnalyticDB for PostgreSQL resource, so you must select Yes.

    VPC ID

    The ID of the VPC where the instance resides.

    VPC-connected Instance ID

    The VPC-connected instance ID of the AnalyticDB for PostgreSQL instance. To obtain this ID, see Step 2 in Step 1: Obtain instance information.

    Port

    The internal port of the instance.

    Instance ID

    The name of the AnalyticDB for PostgreSQL database.

    Internal Endpoint

    Optional. The internal endpoint of the VPC-connected instance.

    Database Name

    The name of the AnalyticDB for PostgreSQL database. To create a database, see Manage databases.

    Username

    The account used to log on to the database.

    Logon Password

    The password used to log on to the database. If you forget the password, go to the AnalyticDB for PostgreSQL console, find the target instance, click the instance ID, and then click Reset Password in the Account Management section of the navigation pane on the left.

    Application Scenario Tags

    Select one or more application scenario tags for the compute resource. Click Add Tag to create custom tags.

    Check Connectivity

    Optional. Tests the connectivity of the new resource. The default value is Yes.

    Resource Group Connectivity

    Configure the resource group connectivity.

  7. After you configure the parameters, click OK.

    The new compute resource appears in the Compute Resources list.