The Domains service provides software development kits (SDKs) for four programming languages: Java, Python, PHP, and .NET. This topic provides the download links and quick start guides of the SDKs for these languages, and demonstrates the installation and usage of the SDK for Java as an example.


This section illustrates how to install and use the Java SDK.
  1. Log on to the Alibaba Cloud official website. Create and manage your AccessKey for your Alibaba Cloud account.
  2. Use Maven to install the SDK.
    1. Create a Maven repository.
               <name>Sonatype Nexus Staging</name>
    2. Add the JAR dependency package.
      Note We recommend that you use the JAR package of the latest version.
    3. Check the following sample code. The following code shows how to submit a task of registering multiple domain names at a time:
      import java.util.ArrayList;
      import com.aliyuncs.DefaultAcsClient;
      import com.aliyuncs.IAcsClient;
      import com.aliyuncs.domain_intl.model.v20171218.SaveBatchTaskForCreatingOrderActivateRequest;
      import com.aliyuncs.domain_intl.model.v20171218.SaveBatchTaskForCreatingOrderActivateRequest.OrderActivateParam;
      import com.aliyuncs.domain_intl.model.v20171218.SaveBatchTaskForCreatingOrderActivateResponse;
      import com.aliyuncs.exceptions.ClientException;
      import com.aliyuncs.exceptions.ServerException;
      import com.aliyuncs.profile.DefaultProfile;
      import com.aliyuncs.profile.IClientProfile;
      public class DomainSdkDemo {
          private static IAcsClient client = null;
          // Initialize the client.
          static {
              String regionId = "ap-southeast-1"; // Use the fixed value ap-southeast-1 for the Domains SDKs.
              String accessKeyId = ""; // your accessKey
              String accessKeySecret = "";// your accessSecret
              IClientProfile profile = DefaultProfile.getProfile(regionId, accessKeyId, accessKeySecret);
              // If the message "Can not find endpoint to access" appears, add the following code:
              // DefaultProfile.addEndpoint("ap-southeast-1", "ap-southeast-1", "Domain-intl", "");
              client = new DefaultAcsClient(profile);
          public static void main(String[] args) {
              // Initialize the request.
              SaveBatchTaskForCreatingOrderActivateRequest request = new SaveBatchTaskForCreatingOrderActivateRequest();
              // request.setProtocol(ProtocolType.HTTPS); // Specify the protocol.
              // request.setAcceptFormat(FormatType.JSON); // Specify the API response format.
              // request.setMethod(MethodType.POST); // Specify the request method.
              ArrayList<OrderActivateParam> list = new ArrayList<OrderActivateParam>();
              OrderActivateParam orderActivateParam = new OrderActivateParam();
              // Initiate an API call and parse the result.
              try {
                  // IAcsClient supports two methods to obtain the response. One is to obtain the result of the original API call, that is, the HttpResponse response, by calling the doAction method. The sample code is as follows:
                  //HttpResponse httpResponse = client.doAction(describeCdnServiceRequest);
                  //System.out.println(new String(httpResponse.getContent()));
                  // The other is to obtain the deserialized object by calling the getAcsResponse method. The sample code is as follows:
                  SaveBatchTaskForCreatingOrderActivateResponse response = client.getAcsResponse(request);
              } catch (ServerException e) {
              } catch (ClientException e) {