All Products
Search
Document Center

OpenAPI Explorer:Use Alibaba Cloud Developer Toolkit in a JetBrains IDE

Last Updated:May 27, 2024

This topic describes how to install and use Alibaba Cloud Developer Toolkit in a JetBrains integrated development environment (IDE).

Install Alibaba Cloud Developer Toolkit

Prerequisites

In this example, two methods are provided to install Alibaba Cloud Developer Toolkit in IntelliJ IDEA for Windows.

Method 1: Download and install Alibaba Cloud Developer Toolkit from the plug-in marketplace

  1. In the top navigation bar of IntelliJ IDEA, click the image icon. On the page that appears, click Plugins in the left-side navigation pane. Alternatively, choose File > image in the top navigation bar. On the page that appears, click Plugins in the left-side navigation pane.

  2. On the Plugins page, click the Marketplace tab.

  3. Search for Alibaba Cloud Developer Toolkit and click Install.

  4. Click Apply and then click OK.

image

Method 2: Download the installation package by using a browser

  1. Visit JetBrains Marketplace by using a browser and download the plug-in package to your on-premises device.

  2. In the top navigation bar of IntelliJ IDEA, click the image icon. On the page that appears, click Plugins in the left-side navigation pane. Alternatively, choose File > image in the top navigation bar. On the page that appears, click Plugins in the left-side navigation pane.

  3. On the Plugins page, click the image icon and select Install Plugin from Disk.... Select the package that you download to install Alibaba Cloud Developer Toolkit. You do not need to decompress the package.

image

Verify the installation

If the shortcut for Alibaba Cloud Developer Toolkit is displayed in the left-side navigation pane of IntelliJ IDEA, the plug-in is installed.image

Configure profiles

You must configure a profile with valid user identity and credential information if you want to call Alibaba Cloud API operations. Alibaba Cloud Developer Toolkit supports only an AccessKey pair as the user identity and credential. You can use one of the following methods to configure profiles.

Note
  • If you have not installed Alibaba Cloud CLI, use Method 1.

  • If you have installed Alibaba Cloud CLI, use Method 1 or Method 2.

Method 1

  1. In the upper-left corner of the Alibaba Cloud Developer Toolkit page, click New Profile or the image icon.image

  2. Configure the Profile Name, RegionId, Access Key ID, and Secret Access Key parameters. For more information about AccessKey pairs, see View the AccessKey pair of a RAM user.

    Important

    An Alibaba Cloud account has full permissions on resources. If the AccessKey pair of an Alibaba Cloud account is leaked, all resources within the account face great security risks. We recommend that you do not use the AccessKey pair of an Alibaba Cloud account.

  3. Click Add Configurations.

  4. In the lower-right corner of the Alibaba Cloud Developer Toolkit page, the Profile added. message appears. Click the drop-down list in the left-side navigation pane to view the profile that is added.

  5. Click the name of a profile to switch to the profile.

image

Method 2

  1. If you have installed Alibaba Cloud CLI, Alibaba Cloud Developer Toolkit automatically reuses the configurations of Alibaba Cloud CLI. For more information about how to configure credentials for Alibaba Cloud CLI, see Overview.

  2. Click the drop-down list in the left-side navigation pane view existing profiles. You can also view the profile that is in use in the lower-right corner of the page.

  3. Click the name of a profile to switch the profile.

2.png

Feature description

After Alibaba Cloud Developer Toolkit is installed in a JetBrains IDE, you can conveniently access Alibaba Cloud services in the IDE. For example, you can search for the APIs of Alibaba Cloud services, debug API operations, and generate and insert SDK demos.1.png

Search for Alibaba Cloud services and API operations

In the left-side navigation pane of the Alibaba Cloud Developer Toolkit page, Alibaba Cloud services are displayed in a tree view. You can search for a service by entering a keyword in the search box. You can also click a service in the tree view to view the API operations of the service and search for a specific API operation on the Alibaba Cloud API tab on the right side.3.png

View API references

After you click an API operation, a new tab appears and displays the API reference. The API reference contains information such as the usage notes, request parameters, response parameters, and error codes.4.png

Debug API operations

  • You can debug API operations after you configure a valid profile that passes the authentication of Alibaba Cloud.

  • You can configure the parameters on the tab of an API operation based on the API reference and debug the API operation. The debugging result is displayed in the JetBrains IDE. You can also click Debug to debug the API operation in OpenAPI Explorer.

5.png

View and insert SDK sample code

View SDK sample code

Alibaba Cloud Developer Toolkit allows you to generate SDK sample code in the JetBrains IDE.

  • After you configure the parameters of an API operation, the sample code that is used to call the API operation is dynamically generated. You can view and edit the sample code in the JetBrains IDE.

  • Maven dependencies can be automatically added.

  • You can click Installation Method to view the methods to install dependencies. You can also click View Source Code to view the SDK sample code.

6.png

Insert SDK sample code

You can insert a sample code snippet of an SDK for Java or an SDK for Java for asynchronous invocation into your code within a few clicks. The corresponding maven dependencies can be automatically added to the pom.xml file. If you want to enable or disable this feature, right-click Alibaba Cloud Develop Toolkit and click Disable/Enable Alibaba Cloud SDK auto-completion or use the shortcut key ctrl+cmd+p.7.png8.png9.png