This topic describes how to install SDKs for .NET and provides sample code.

Background information

  • To use Resource Management SDK for .NET, you must install both the core library of Alibaba Cloud SDK for .NET(aliyun-net-sdk-core) and Resource Management SDK for .NET (alibabacloud-csharp-sdk).
  • Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to debug API operations and dynamically generate SDK sample code.
  • For more information about Resource Management API operations, see List of operations by function.


For information about how to install the SDKs for .NET, see Get started.

You can download the installation packages of the SDKs for .NET from the following links:


The following example shows how to use Resource Management SDK for .NET to call the CreateResourceAccount API operation. You can visit OpenAPI Explorer to debug other API operations and obtain their sample code.

using System;
using System.Collections.Generic;
using Aliyun.Acs.Core;
using Aliyun.Acs.Core.Profile;
using Aliyun.Acs.Core.Exceptions;
using Aliyun.Acs.Core.Http;

namespace CommonRequestDemo
    class Program
        static void Main(string[] args)
            // Construct an Alibaba Cloud client that is used to initiate requests.
            // When you construct the client, specify your AccessKey ID and AccessKey secret.
            IClientProfile profile = DefaultProfile.GetProfile("cn-hangzhou", "<accessKeyId>", "<accessSecret>");
            DefaultAcsClient client = new DefaultAcsClient(profile);
            // Construct a request and configure the request parameters.
            CommonRequest request = new CommonRequest();
            request.Method = MethodType.POST;
            request.Domain = "";
            request.Version = "2020-03-31";
            request.Action = "CreateResourceAccount";
            // request.Protocol = ProtocolType.HTTP;
            request.AddQueryParameters("DisplayName", "<DisplayName>");

            // Initiate a request and obtain a response.
            try {
                CommonResponse response = client.GetCommonResponse(request);
            catch (ServerException e)
            catch (ClientException e)