Create a VPC-type compute resource
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
You have created and configured a VPC. For more information, see Quick Start for VPC.
You have created an AnalyticDB for PostgreSQL instance. For more information, see Quick Start for AnalyticDB for PostgreSQL.
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
Obtain the instance ID, port, VPC ID, database name, username, and logon password of the target instance from the AnalyticDB for PostgreSQL console.
Log on to the AnalyticDB for PostgreSQL console.
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.
Click the Instance ID to open the instance details page.
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.
In the navigation pane on the left, click Database Connection to obtain the VPC ID, Internal Endpoint, and Port in the VPC.
In the Alibaba Cloud OpenAPI Developer Portal, call the DescribeDBInstanceNetInfo operation of AnalyticDB for PostgreSQL to obtain the VPC-connected instance ID.
Go to the DescribeDBInstanceNetInfo page.
NoteLog on to the AnalyticDB for PostgreSQL console before you call the DescribeDBInstanceNetInfo operation in the Alibaba Cloud OpenAPI Developer Portal.
For Service Endpoint, select the region where your target instance resides. You can verify the region in the AnalyticDB for PostgreSQL console.
On the Parameter Settings page, enter the instance ID of the target instance in the DBInstanceId field.
Click Make Call, and wait for the API Call Result to appear on the right.
In the API call response, VpcInstanceId is the VPC Instance ID of the target instance.
Optional: Obtain the ID of the Alibaba Cloud account that owns the instance.
Log on to the Alibaba Cloud account that owns the instance.
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
Log on to the Data Resource Platform console.
Click the
icon in the upper-right corner of the page and select System Settings.In the left navigation pane, click Group Management.
On the Workgroup Management page, select the target workgroup and click Cloud Computing Resources in the Actions column.
On the Compute Resources page, click Create Compute Resource.
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
icon to view the IP address.NoteBefore 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.
After you configure the parameters, click OK.
The new compute resource appears in the Compute Resources list.