Alibaba Cloud Content Delivery Network (CDN), is a distributed network built on, and overlaying, the bearer network, and is composed of edge node server clusters distributed across different regions. For more information, see CDN documentation.
This tutorial uses the
AddCdnDomain API of CDN to show you how to add a CDN domain.
Before creating a CDN domain, you must have activated the CDN service.
The CDN domain name must already have been filed.
If the origin site content is not on the Alibaba Cloud platform, it must be reviewed. The review will be completed before the next business day.
using namespace AlibabaCloud;
using namespace AlibabaCloud::Cdn;
int main(int argc, char** argv)
// Initialize the SDK
// Create a client instance
CdnClient client("<your-access-key-id>", "<your-access-key-secret>", configuration);
// Create a request and set parameters
// Initiate the request
auto outcome = client.addCdnDomain(request);
std::cout << "Success" << std::endl;
// Close the SDK