Integrate with Alibaba Cloud CDN through OpenAPI Explorer, SDKs, CLI, Terraform, or direct HTTP calls.
OpenAPI Explorer
OpenAPI Explorer lets you search APIs, access documentation, debug and call Alibaba Cloud APIs, view requests and responses, acquire SDKs, browse sample code, diagnose errors, and view call statistics. What is an API?
Version
|
Version |
Description |
|
Recommended. |
Online debugging
CDN supports API debugging in OpenAPI Explorer. Before calling an API, review the supported versions, endpoints, and integration methods of Alibaba Cloud CDN.
Example: To call AddCdnDomain, go to Domain Management > Add/Delete Domain Names > Add Domain Name (AddCdnDomain). Set the required parameters (CdnType, DomainName, Sources) and optional parameters (ResourceGroupId, CheckUrl, Scope, TopLevelDomain), then click Initiate Call. Requirements: CDN activated, domain with ICP filing, one domain per call, up to 50 domains per account, 30 calls per second.
Debugging portal
Access the CDN API Debugging Center.
Endpoints
Select the endpoint closest to your resources to reduce latency. For example, the CDN endpoint in China (Shanghai) is cn-shanghai.aliyuncs.com.
All available endpoints are listed in Endpoints.
User identity
OpenAPI Explorer uses your Alibaba Cloud account by default, which has full API permissions. Use a RAM user for API calls and daily O&M, and grant only the CDN permissions your workload requires. Implement access control with RAM.
|
Identity |
Supported |
|
Yes |
|
|
RAM user (recommended) |
Yes |
|
RAM role (recommended) |
Yes |
References
Integration methods
CDN supports the following integration methods.
|
Integration method |
Supported |
|
Alibaba Cloud SDK (recommended) |
Yes |
|
Yes |
|
|
Yes |
|
|
Yes |
|
|
Yes |
Alibaba Cloud SDK
-
The Alibaba Cloud SDK supports Java, C#, Go, Python, Node.js/TypeScript, PHP, and C++, and handles signature calculation, timeouts, and retries automatically, returning structured response objects.
-
For CDN SDK language support and installation instructions, visit the CDN SDK Center.
Alibaba Cloud CLI
-
Call CDN APIs from the command line. Using Alibaba Cloud CLI.
-
Alibaba Cloud CLI lets you run
aliyuncommands to manage cloud resources from a terminal.
Terraform
-
Terraform is an open-source infrastructure-as-code tool that converts templates into API calls to provision and manage cloud resources.
-
Orchestrate CDN resources with Terraform using the Terraform integration examples.
-
CDN Terraform resources and data sources:
Resource type
Resource
Description
Resources
Configures a domain in Alibaba Cloud CDN.
Adds a domain name to Alibaba Cloud CDN.
Creates a Function Compute (FC) trigger for an Alibaba Cloud CDN event.
Configures real-time log delivery for Alibaba Cloud CDN.
Data Sources
Provides the blocked regions of Alibaba Cloud CDN.
Verifies whether an IP address belongs to an Alibaba Cloud CDN point of presence (POP).
Provides real-time log delivery for CDN.
Automatically activates Alibaba Cloud CDN.
Resource Orchestration Service (ROS)
-
Resource Orchestration Service (ROS) automates resource provisioning from templates. Define resources and their dependencies, and ROS creates and configures them automatically.
-
Orchestrate CDN resources with ROS using the ROS integration examples.
-
Supported CDN resource types:
-
Regular resources:
-
ALIYUN::CDN::Domain: adds an accelerated domain name.
-
ALIYUN::CDN::DomainConfig: configures multiple domain name settings in batches.
-
-
Data sources:
-
DATASOURCE::CDN::Domains: queries basic information about created accelerated domain names.
-
-
Making direct API calls
-
Direct HTTP calls require implementing the signature algorithm described in API overview and Request syntax and signature method V3.
Error handling
If an API call returns an error, look up the error code in the Error Code Center.
Use the RequestID from the response or SDK error message on the Alibaba Cloud OpenAPI Diagnostics platform to troubleshoot errors.