All Products
Search
Document Center

Alibaba Cloud SDK:Configure a dependency

Last Updated:Feb 23, 2022

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:

// Download the Darabonba SDK 1.x.
$ go get -u github.com/alibabacloud-go/ecs-20140526/v1/client
// Download the Darabonba SDK 2.x.
$ go get -u github.com/alibabacloud-go/ecs-20140526/v2/client

You can replace ecs-20140526 based on your business requirements. For more information about the Darabonba SDK of each Alibaba Cloud service, visit SDK library. The following code provides an example on how to configure a dependency in Go:

"github.com/alibabacloud-go/darabonba-openapi/client"
"github.com/alibabacloud-go/tea/tea"
// Configure the Darabonba SDK 1.x as a dependency.
"github.com/alibabacloud-go/ecs-20140526/v1/client"
// Configure the Darabonba SDK 2.x as a dependency.
"github.com/alibabacloud-go/ecs-20140526/v2/client"