All Products
Search
Document Center

Alibaba Cloud SDK:Dependencies

Last Updated:Sep 06, 2022

This topic describes how to configure a dependency in the Darabonba SDK.

Configure the Darabonba SDK of an Alibaba Cloud service as a dependency

The Classic SDK has a large number of users, and the Darabonba SDK is not compatible with the Classic SDK. The naming conventions for the Darabonba SDK and the Classic SDK are different. The following code provides an example on how to configure the Darabonba SDK of Elastic Compute Service (ECS) and the Classic SDK of ECS as Maven dependencies:

<dependencies>
  <!--  The Darabonba SDK  -->
  <dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>ecs20140526</artifactId>
    <version>1.0.2</version>
  </dependency>
  <!--  The Classic SDK  -->
  <dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-ecs</artifactId>
    <version>4.23.12</version>
  </dependency>
</dependencies>

The Darabonba SDK of each Alibaba Cloud service is named in the alibabacloud/${Service name}${API version number} format. If you want to view the information about the Darabonba SDK or the Classic SDK of each Alibaba Cloud service, visit SDK Center.

Make API requests without referencing the core library

The Darabonba SDK uses the main API-based logic to process parameters, send requests, and process return values. You do not need to make API requests based on the core library. In the Darabonba SDK, functions are abstracted from common methods and are encapsulated into modules. You can make API requests by installing only the SDK of an Alibaba Cloud service as a dependency. You can run the following commands to download the latest modules:

<dependency>
  <groupId>com.aliyun</groupId>
  <artifactId>tea-openapi</artifactId>
  <version>[0.0.1,0.1.0)</version>
</dependency>