Integration overview
This topic provides an overview of using the AnalyticDB for MySQL OpenAPI.
OpenAPI Explorer
Alibaba Cloud provides OpenAPI Explorer to help you efficiently learn and use cloud product APIs. OpenAPI Explorer is a comprehensive tool that offers intelligent API search, documentation, online debugging, SDK downloads, code samples, error diagnostics, and usage statistics. You can use OpenAPI Explorer to call Alibaba Cloud service APIs, view requests and responses, and automatically generate SDK sample code to get started quickly. For more information, see What is OpenAPI?.
API versions
Alibaba Cloud uses API versions to distinguish between AnalyticDB for MySQL clusters with different architectures. Choose the API version that corresponds to your cluster edition.
|
API version |
Description |
|
2019-03-15 |
Use this version to call APIs for Data Warehouse Edition clusters. |
|
2021-12-01 |
Use this version to call APIs for Enterprise Edition, Basic Edition, and Data Lakehouse Edition clusters. |
Online debugging
AnalyticDB for MySQL provides features such as API debugging in the OpenAPI Portal. Before you make an API call, you need to understand information such as the versions, endpoint descriptions, and integration methods provided by AnalyticDB for MySQL.
In OpenAPI Explorer, the left-side navigation pane lists the available API operations by feature category, such as Cluster Management. After you select a target API, such as CreateDBCluster, go to the Parameter Configuration tab in the center pane. Fill in the request parameters, such as RegionId, ZoneId, DBClusterVersion, DBClusterCategory, DBClusterClass, DBNodeGroupCount, and DBNodeStorage, and then click Initiate Call. The right-side pane provides reference information, including API documentation, SDK examples, and CLI examples.
Debugging pages
AnalyticDB for MySQL is available in Data Warehouse Edition, Enterprise Edition, Basic Edition, and Data Lakehouse Edition. Each edition has a different API debugging page. Select the appropriate page for your cluster edition.
|
Cluster edition |
API debugging page |
|
Data Warehouse Edition |
|
|
Enterprise Edition, Basic Edition, and Data Lakehouse Edition |
API debugging page for Enterprise, Basic, and Data Lakehouse Edition clusters |
Endpoints
To minimize latency, select the endpoint for the region that hosts your resources. For example, for an AnalyticDB for MySQL cluster in the China (Zhangjiakou) region, the public endpoint is adb.cn-zhangjiakou.aliyuncs.com and the VPC endpoint is adb-vpc.cn-zhangjiakou.aliyuncs.com.
-
Public endpoints are globally accessible.
-
A Virtual Private Cloud (VPC) isolates your resources within a dedicated virtual network. VPC endpoints offer the following advantages:
-
High security: VPC endpoints can be accessed only from within a VPC, providing enhanced security.
-
Faster response: By operating on the VPC internal network, VPC endpoints provide faster response times than public endpoints and can avoid issues such as public network latency and bandwidth limitations.
-
Lower cost: VPC endpoints use internal network communication, which may be free of charge or less expensive than public network traffic.
-
For endpoint information for Data Warehouse Edition, see Endpoints. For endpoint information for Enterprise Edition, Basic Edition, and Data Lakehouse Edition, see the endpoint details in the respective API documentation.
Supported identities
By default, OpenAPI Explorer uses your logged-in account for online API debugging. Using your Alibaba Cloud account for online debugging is not recommended because it has full access to all APIs, which poses a high security risk. We strongly recommend creating and using a RAM user with on-demand permissions for API access and daily operations. The RAM user must have permissions to manage AnalyticDB for MySQL resources. For more information, see Grant permissions to a RAM user.
|
Identity |
Supported |
|
Yes |
|
|
RAM user (recommended) |
Yes |
|
RAM role (recommended) |
Yes |
Integration methods
AnalyticDB for MySQL supports multiple integration methods, including Alibaba Cloud SDKs and custom encapsulation.
SDKs are easy to integrate and are the recommended method for calling APIs.
|
Integration method |
Supported |
|
Alibaba Cloud SDK (recommended) |
Yes |
|
Alibaba Cloud CLI |
Yes |
|
Resource Orchestration Service (ROS) |
Yes |
|
Terraform |
Yes |
|
Custom encapsulation |
Yes |
Alibaba Cloud SDKs
-
Alibaba Cloud provides SDKs in multiple programming languages, such as Java, C#, Go, Python, Node.js, TypeScript, PHP, and C++. These SDKs handle implementation details, such as identity, authentication, and signature rules. This allows you to call an API directly by simply integrating the SDK. For more information about Alibaba Cloud SDKs, see Alibaba Cloud SDKs.
-
Supported: You can call the AnalyticDB for MySQL API by using Alibaba Cloud SDKs. For information about the supported languages and how to install dependencies, see AnalyticDB for MySQL SDKs.
Alibaba Cloud CLI
-
The Alibaba Cloud CLI is a command-line tool for managing and interacting with Alibaba Cloud services by using the
aliyuncommand. For more information about the Alibaba Cloud CLI, see What is Alibaba Cloud CLI?. -
Supported: You can use the Alibaba Cloud CLI to call the AnalyticDB for MySQL API. For more information, see Alibaba Cloud CLI.
Terraform
-
Terraform is an open source tool that you can use to securely and efficiently preview, configure, and manage cloud infrastructure and resources. It functions similarly to Alibaba Cloud Resource Orchestration Service (ROS) by converting templates into internal data to make API calls. For more information, see What is Alibaba Cloud Terraform?.
-
Supported: You can use Terraform to orchestrate and use AnalyticDB for MySQL.
Resource orchestration service (ROS)
-
Resource Orchestration Service (ROS) is an Alibaba Cloud service that simplifies cloud resource management. You can write templates to define required Alibaba Cloud resources, such as Elastic Compute Service (ECS) instances and ApsaraDB RDS instances, and their dependencies. The ROS orchestration engine then automatically creates and configures all resources based on the template, which enables automated deployment and operations. For more information, see What is Resource Orchestration Service?.
-
Supported: You can use ROS to orchestrate and call the AnalyticDB for MySQL API. For more information, see ROS.
Custom encapsulation
With native HTTP calls, you must implement the signing algorithm, construct the custom request, and initiate the HTTP call. For more information about the signature mechanism, see V3 request structure and signature.
Notes
If an API call fails, use the returned error code to verify that the request parameters and their values are correct. For more information, see the Error Code Center.
You can also record the RequestID returned from the call or the SDK error message and use the Alibaba Cloud OpenAPI Diagnostics Platform for self-service troubleshooting.