All Products
Search
Document Center

Backup and Disaster Recovery Center:Get started with DBRC SDK for Java

Last Updated:Jun 02, 2026

Install the DBRC SDK for Java, configure your credentials, and make your first API call.

Prerequisites

Environment requirements

Java version

Run java -version to verify your installation.

Sample code

Step 1: Download an SDK project

  1. Log on to OpenAPI Explorer.

  2. In the top navigation bar, click Cloud Products and select your cloud service.

  3. On the Product Homepage, click API Debugging in the top navigation bar.

  4. Select an API operation in the left column, configure parameters in the middle column, and click the SDK Sample Code tab in the right column.

  5. Select V2.0 from the SDK Generation drop-down list and choose a programming language.

  6. Click Download Project.

  7. To generate generic code, turn on Common Request. Generic calls and specialized calls.

Step 2: Configure environment variables

  1. Run the following commands in a terminal. Replace <access_key_id> and <access_key_secret> with your actual values.

    export ALIBABA_CLOUD_ACCESS_KEY_ID=<ACCESS_KEY_ID>
    export ALIBABA_CLOUD_ACCESS_KEY_SECRET=<ACCESS_KEY_SECRET>
  2. Restart IntelliJ IDEA to load the new environment variables.

    Note

    On Linux, these export commands create temporary environment variables that apply only to the current shell session. For example, run mvn package to build a JAR file, then run java -jar <jarfilepath> in the same session.

Step 3: Run the code

  1. Run the code in IntelliJ IDEA. Check the console output for the response and request ID.

  2. If the API operation creates an instance, the response includes the instance ID. Verify the result in the Alibaba Cloud console.