Integration overview
This topic provides basic information and important notes about using the OpenAPI of AnalyticDB for PostgreSQL.
OpenAPI introduction
Alibaba Cloud provides the OpenAPI Portal to help you learn about and use the OpenAPI of Alibaba Cloud services. The portal integrates features such as intelligent search, documentation, online debugging, software development kits (SDKs), code samples, error diagnosis, and call statistics. In the OpenAPI Portal, you can call the OpenAPI of various Alibaba Cloud services, view the requests and responses, and automatically generate SDK sample code to help you quickly get started with Alibaba Cloud products. For more information, see Use OpenAPI.
Version guide
Alibaba Cloud OpenAPI uses version numbers to manage APIs for major versions. AnalyticDB for PostgreSQL currently supports the 2016-05-03 API version. The version number 2016-05-03 is an API version identifier, not a date. The APIs are the latest public versions and are continuously updated.
|
Version number |
Description |
|
Use this version number to call the APIs for AnalyticDB for PostgreSQL instances. |
Online debugging
AnalyticDB for PostgreSQL provides features such as API debugging on the OpenAPI Portal. Before you make a call, you need to understand key information about AnalyticDB for PostgreSQL, such as the API version, endpoints, and integration methods.
Debugging entry point
To debug APIs, go to the AnalyticDB for PostgreSQL API debugging page.
Endpoint description
Choose the endpoint that corresponds to the region where your resources are located. This ensures the lowest latency.
For example, for AnalyticDB for PostgreSQL in the China (Zhangjiakou) region, the public endpoint is gpdb.cn-zhangjiakou.aliyuncs.com and the VPC endpoint is gpdb-vpc.cn-zhangjiakou.aliyuncs.com.
Public endpoints are accessible from anywhere on the Internet.
A Virtual Private Cloud (VPC) is an isolated virtual network. VPCs offer the following advantages:
High security: VPC endpoints can only be accessed from within the VPC. This provides enhanced security and privacy.
Faster response: Because VPC endpoints operate within the VPC's internal network, they typically respond faster than public endpoints. They also avoid issues such as Internet latency and bandwidth limitations.
Lower cost: VPC endpoints use internal network communication, which can reduce data transfer costs.
For more information, see Endpoints.
Supported user identities
When you log on to the OpenAPI Portal, it uses your current account to debug APIs by default. An Alibaba Cloud account has full access permissions for all APIs, which poses a high security threat. Do not use an Alibaba Cloud account for online API debugging. Instead, create and use a Resource Access Management (RAM) user for API access or daily O&M. Grant only the necessary permissions to the RAM user before you call APIs. The RAM user must have permissions to manage AnalyticDB for PostgreSQL. For more information, see Authorization.
User identity | Compatibility |
Support | |
RAM user (Recommended) | Support |
RAM role (Recommended) | Supported |
Integration methods
AnalyticDB for PostgreSQL provides several integration methods: Alibaba Cloud SDK, Alibaba Cloud CLI, Terraform, Resource Orchestration Service (ROS), and custom encapsulation. You can choose a method based on your requirements.
SDKs are easy to integrate and are the recommended method for calling the OpenAPI.
Method | Support |
Alibaba Cloud SDK (Recommended) | Supported |
Alibaba Cloud CLI | Support |
Resource Orchestration Service | Support |
Terraform | Support |
Alibaba Cloud SDK
Alibaba Cloud provides SDKs for multiple programming languages, such as Java, C#, Go, Python, Node.js, TypeScript, PHP, and C++. The SDKs handle OpenAPI implementation details, such as identity, authentication, and signature rules. You can integrate an SDK to call the OpenAPI directly. For more information about Alibaba Cloud SDKs, see Alibaba Cloud SDK.
You can use Alibaba Cloud SDKs to call the OpenAPI of AnalyticDB for PostgreSQL. For information about the supported languages and dependency installation methods, see SDK overview.
Alibaba Cloud CLI
The Alibaba Cloud command line interface (CLI) is a tool that lets you use the
aliyuncommand from a command-line shell to interact with Alibaba Cloud services and manage your cloud resources. For more information about the Alibaba Cloud CLI, see What is Alibaba Cloud CLI?.
Terraform
Terraform is an open source tool that you can use to safely and efficiently preview, configure, and manage cloud infrastructure and resources. Its operating mechanism is similar to that of Alibaba Cloud Resource Orchestration Service (ROS). Terraform converts templates into internal data to make OpenAPI calls. For more information, see Terraform introduction.
For information about how to use Terraform to call AnalyticDB for PostgreSQL APIs, see Terraform.
Resource Orchestration Service (ROS)
Resource Orchestration Service (ROS) is an Alibaba Cloud service that simplifies cloud computing resource management. Developers and administrators can create templates to define the required Alibaba Cloud resources, such as ECS instances and RDS database instances, and their dependencies. The ROS orchestration engine then automatically creates and configures all resources based on the templates. This automates the deployment and O&M processes. For more information, see What is Resource Orchestration Service?.
You can use ROS to call the OpenAPI of AnalyticDB for PostgreSQL. For a list of supported general and data resources, see Resource orchestration list.
Custom encapsulation
You can create custom encapsulated requests to access the Alibaba Cloud OpenAPI. For native HTTP calls, you must implement the signature algorithm, build a custom request, and initiate the HTTP call. For more information about the signature mechanism, see V3 request body & signature mechanism.
Notes
If an API call returns an error, check the returned error code to verify that your request parameters and their values are correct. For more information, see the Error Code Center.
You can also record the RequestID returned by the call or any SDK error messages, and then use the Alibaba Cloud OpenAPI Diagnostic Platform to diagnose the issue.