Fără Descriere

yixiong.jxy f87f6a1649 LUBANCLOUD SDK Auto Released By benxiang.hhq,Version:1.30.0 7 ani în urmă
3rdparty b61a72e58e Fix build failed 8 ani în urmă
aegis 7be1f34dae Fix build failed on windows 8 ani în urmă
afs 7be1f34dae Fix build failed on windows 8 ani în urmă
arms bc8404e573 ARMS SDK Auto Released By qikai.yangqikai,Version:1.28.1 8 ani în urmă
ccc 5aaae25e49 CCC SDK Auto Released By yonghong.lyh,Version:1.22.1 8 ani în urmă
ccs 6e9b1bebe0 CCS SDK Auto Released By wilson.liuw,Version:1.26.2 8 ani în urmă
cdn 1f03f4f394 CDN SDK Auto Released By xiaoyao,Version:1.29.3 8 ani în urmă
chatbot 0880c7f722 CHATBOT SDK Auto Released By yanke.yk,Version:1.19.0 8 ani în urmă
cloudauth b3d7dcffc4 CLOUDAUTH SDK Auto Released By gongpei.gp,Version:1.29.1 8 ani în urmă
cloudphoto 1c441b53f5 由廷诚发起的CLOUDPHOTO SDK自动发布, 版本号:1.6.5 8 ani în urmă
cms 7be1f34dae Fix build failed on windows 8 ani în urmă
core b87f210c4c Fix setEndpoint bug 8 ani în urmă
core-tests f6db1a27e4 Init commit 8 ani în urmă
cs 7be1f34dae Fix build failed on windows 8 ani în urmă
csb 002d5fb06f CSB SDK Auto Released By yaolan.lt,Version:1.24.1 8 ani în urmă
dcdn cb75e762ab DCDN SDK Auto Released By xiaoyao,Version:1.27.4 8 ani în urmă
domain 623d36b29e DOMAIN SDK Auto Released By huizeng.zh,Version:1.29.0 8 ani în urmă
drds 6d41511442 由燧木发起的DRDS SDK自动发布, 版本号:1.12.0 8 ani în urmă
dyvmsapi 02c620b5a5 由峰远发起的DYVMSAPI SDK自动发布, 版本号:1.10.3 8 ani în urmă
ecs 59a99f2145 ECS SDK Auto Released By corey.ql,Version:1.28.0 8 ani în urmă
ehpc f2a390fbc8 EHPC SDK Auto Released By qianzheng.llc,Version:1.27.0 8 ani în urmă
ess 60a0077509 ESS SDK Auto Released By kangning.tkn,Version:1.25.2 8 ani în urmă
green eadff9b0ef GREEN SDK Auto Released By fengdong.xfd,Version:1.26.3 8 ani în urmă
hsm 339cf28edd 由鸿逸发起的HSM SDK自动发布, 版本号:1.7.1 8 ani în urmă
iot a2308b2c95 IOT SDK Auto Released By cheyun.lxf,Version:1.27.9 8 ani în urmă
jarvis 8eb39b6f8f JARVIS SDK Auto Released By mainri.mxy,Version:1.17.6 8 ani în urmă
linkface 42253f9e7a LINKFACE SDK Auto Released By jiayao.wjy,Version:1.22.6 8 ani în urmă
live 214a571b8a LIVE SDK Auto Released By renrang.yl,Version:1.29.2 8 ani în urmă
lubancloud f87f6a1649 LUBANCLOUD SDK Auto Released By benxiang.hhq,Version:1.30.0 7 ani în urmă
mopen f6d7b208a9 MOPEN SDK Auto Released By everettli.ll,Version:1.20.4 8 ani în urmă
mts 13ea4f0698 MTS SDK Auto Released By lingkong.mxs,Version:1.21.1 8 ani în urmă
ots e16ab91844 OTS SDK Auto Released By wanhong.chenwh,Version:1.21.5 8 ani în urmă
productcatalogtestcasehasversionhasapipass 857329972e update 8 ani în urmă
push c3ff60fd73 由释一发起的PUSH SDK自动发布, BUILD_ID=490, 版本号:1.3.0 8 ani în urmă
pvtz 62e3b9762a 由空木发起的PVTZ SDK自动发布, 版本号:1.10.0 8 ani în urmă
rds 459c875c7d 由秒本发起的RDS SDK自动发布, 版本号:1.10.2 8 ani în urmă
rtc 6c1391eb82 RTC SDK Auto Released By renrang.yl,Version:1.25.3 8 ani în urmă
saf 6182017316 SAF SDK Auto Released By xinfa.duanxf,Version:1.27.6 8 ani în urmă
scdn e82b02a876 SCDN SDK Auto Released By xiaoyao,Version:1.27.3 8 ani în urmă
slb 84adbb2cb8 SLB SDK Auto Released By laysong.sl,Version:1.23.4 8 ani în urmă
smartag 127c992829 SMARTAG SDK Auto Released By jijun.jj,Version:1.21.6 8 ani în urmă
tesladam 7be1f34dae Fix build failed on windows 8 ani în urmă
teslamaxcompute d63881daa0 由荣旸发起的TESLAMAXCOMPUTE SDK自动发布, 版本号:1.8.2 8 ani în urmă
teslastream 20195cdd92 TESLASTREAM SDK Auto Released By tony.ly,Version:1.20.2 8 ani în urmă
vod ccec5843c8 VOD SDK Auto Released By guzhaoyuan,Version:1.27.7 8 ani în urmă
vpc 85da4ff587 由温仰发起的VPC SDK自动发布, BUILD_ID=466, 版本号:1.2.13 8 ani în urmă
CHANGELOG f87f6a1649 LUBANCLOUD SDK Auto Released By benxiang.hhq,Version:1.30.0 7 ani în urmă
CMakeLists.txt f87f6a1649 LUBANCLOUD SDK Auto Released By benxiang.hhq,Version:1.30.0 7 ani în urmă
Doxyfile f6db1a27e4 Init commit 8 ani în urmă
LICENSE f6db1a27e4 Init commit 8 ani în urmă
README.md d29cf439dd add readme 8 ani în urmă
README_zh.md 643f3a01b8 Update README_zh.md 8 ani în urmă
VERSION f87f6a1649 LUBANCLOUD SDK Auto Released By benxiang.hhq,Version:1.30.0 7 ani în urmă

README.md

Alibaba Cloud C++ Software Development Kit

中文文档

The Alibaba Cloud C++ Software Development Kit (SDK) allows you to access Alibaba Cloud services such as Elastic Compute Service (ECS), Server Load Balancer (SLB), and CloudMonitor. You can access Alibaba Cloud services without the need to handle API related tasks, such as signing and constructing your requests.

This document introduces how to obtain and call Alibaba Cloud C++ SDK.

If you have any problem while using C++ SDK, please join the DingTalk group: 11771185 (the official SDK customer service group of Alibaba Cloud) for consultation.

Prerequisites

  • To use Alibaba Cloud C++ SDK, you must have an Alibaba Cloud account and an AccessKey.

    The AccessKey is required when initializing the client. You can create an AccessKey in the Alibaba Cloud console. For more information, see Create an AccessKey.

    Note: To increase the security of your account, we recommend that you use the AccessKey of the RAM user to access Alibaba Cloud services.

  • To use Alibaba Cloud C++ SDK to access the APIs of a product, you must first activate the product on the Alibaba Cloud console if required.

Install C++ SDK

  1. Install third-party libraries on the Linux platform, including libcurl, libopenssl, libuuid, and libjsoncpp.

    • Run the following commands on the Redhat/Fedora system to install third-party libraries.

      sudo dnf install libcurl-devel openssl-devel libuuid-devel libjsoncpp-devel
      
    • Run the following commands on the Debian/Ubuntu system to install third-party libraries.

      sudo apt-get install libcurl4-openssl-dev libssl-dev uuid-dev libjsoncpp-dev
      
  2. Run the following commands to clone source codes from GitHub.

    git clone https://github.com/aliyun/aliyun-openapi-cpp-sdk.git
    

Use the C++ SDK

Before using C++ SDK, you must first configure the preprocessor to define ALIBABACLOUD_SHARED to achieve dynamic linking with Alibaba Cloud C++ SDK shared libraries. Then you must create a client instance, specify the region of cloud services and provide authentication parameters before sending API requests.

The following code shows how to call the DescribeInstances API of ECS to query detailed information of all ECS instances in a specific region.

#include <iostream>
#include <alibabacloud/core/AlibabaCloud.h>
#include <alibabacloud/ecs/EcsClient.h>

using namespace AlibabaCloud;
using namespace AlibabaCloud::Ecs;

int main(int argc, char** argv)
{
	// Initialize the SDK
	AlibabaCloud::InitializeSdk();

	// Configure the ECS instance
	ClientConfiguration configuration("<your-region-id>");
	EcsClient client("<your-access-key-id>", "<your-access-key-secret>", configuration);

	// Create an API request and set parameters
	Model::DescribeInstancesRequest request;
	request.setPageSize(10);

	auto outcome = client.describeInstances(request);
	if (!outcome.isSuccess()) 
	{
		// Handle exceptions
		std::cout << outcome.error().errorCode() << std::endl;
		AlibabaCloud::ShutdownSdk();
		return -1;
	}
	
	std::cout << "totalCount: " << outcome.result().getTotalCount() << std::endl;

	// Close the SDK
	AlibabaCloud::ShutdownSdk();
	return 0;
}