All Products
Search
Document Center

CDN:Integration overview

Last Updated:Sep 04, 2024

This topic describes basic information about the Alibaba Cloud CDN API.

Overview of OpenAPI Explorer

Alibaba Cloud provides OpenAPI Explorer for developers to understand and use the API operations of various Alibaba Cloud services in a quick and efficient manner. OpenAPI Explorer integrates multiple features related to API operations, including intelligent search, documentation, online debugging, SDK download, sample code, error diagnostics, and call statistics. In OpenAPI Explorer, you can call the API operations of Alibaba Cloud services and view API requests and responses. In addition, OpenAPI Explorer automatically generates the corresponding SDK sample code to facilitate use of Alibaba Cloud services. For more information, see What is an API?

Version description

Version

Description

2018-05-10

We recommend that you use this version.

Online debugging

Alibaba Cloud CDN provides features such as API debugging in OpenAPI Explorer. Before you call API operations, make sure that you are familiar with the following information about Alibaba Cloud CDN: versions, endpoints, and integration methods.

image

Debugging page

Access OpenAPI Portal.

Endpoints

Select an endpoint based on the region where your resource resides to reduce latency. For example, the public endpoint of Alibaba Cloud CDN in the China (Shanghai) region is cn-shanghai.aliyuncs.com.

For more information, see Endpoints.

User identities

By default, after you log on to OpenAPI Explorer with your Alibaba Cloud account, the Alibaba Cloud account is used to perform online debugging. An Alibaba Cloud account has permissions on all API operations. If you use an Alibaba Cloud account to call API operations, security risks may arise. We strongly recommend that you call API operations or perform routine O&M by using a RAM user. Before you call API operations as a RAM user, grant the required permissions to the RAM user based on your business requirements. The RAM user must have the permissions to manage Alibaba Cloud CDN resources. For more information, see Use RAM to implement access control.

Identity

Supported

Alibaba Cloud account

Yes

RAM user (recommended)

Yes

RAM role (recommended)

Yes

References

Integration methods

Alibaba Cloud CDN provides various integration methods such as SDK and CLI. You can select a method based on your business requirements.

Integration method

Supported

Alibaba Cloud SDK (recommended)

Yes

Alibaba Cloud CLI

Yes

Terraform

Yes

ROS

Yes

Custom API encapsulation

Yes

Alibaba Cloud SDK

  • Alibaba Cloud provides SDKs in multiple programming languages, including Java, C#, Go, Python, TypeScript, Node.js, PHP, and C++. You can integrate SDKs into your applications to directly call API operations. The SDKs encapsulate information such as the signature logic, timeout mechanism, and retry mechanism, and return structured response objects based on specifications. This provides convenience for developers. For more information, see Alibaba Cloud SDKs.

  • You can use Alibaba Cloud SDKs to call the API operations of Alibaba Cloud CDN. For more information about supported languages and dependencies, go to OpenAPI Portal.

Alibaba Cloud CLI

  • You can use Alibaba Cloud CLI to call the API operations of Alibaba Cloud CDN. For more information, see Sample commands.

  • You can run aliyun commands to interact with Alibaba Cloud services and manage cloud service resources. For more information, see What is Alibaba Cloud CLI?

Terraform

  • Terraform is an open source tool that is used to preview, configure, and manage cloud infrastructure and resources in a secure and efficient manner. Terraform works in a similar way as Resource Orchestration Service (ROS). Terraform calls API operations by interpreting templates. For more information, see What is Terraform?

  • You can use Terraform to manage Alibaba Cloud CDN resources. The following table lists regular resources and data resources.

    Resource type

    Resource

    Description

    Resources

    alicloud_cdn_domain_config

    Provides domain configuration resources for Alibaba Cloud CDN.

    alicloud_cdn_domain_new

    Provides resources and domain names for Alibaba Cloud CDN.

    alicloud_cdn_fc_trigger

    Provides Function Compute trigger resources for Alibaba Cloud CDN.

    alicloud_cdn_real_time_log_delivery

    Provides real-time log delivery resources for Alibaba Cloud CDN.

    Date Sources

    alicloud_cdn_blocked_regions

    Provides blocked regions for Alibaba Cloud CDN.

    alicloud_cdn_ip_info

    Verifies whether an IP address belongs to an Alibaba Cloud CDN point of presence (POP).

    alicloud_cdn_real_time_log_deliveries

    Deliver real-time logs for the current Alibaba Cloud CDN user.

    alicloud_cdn_service

    Automatically activates Alibaba Cloud CDN.

ROS

  • ROS is an Alibaba Cloud service that can simplify the management of cloud computing resources. You can create a template to describe the cloud computing resources such as Elastic Compute Service (ECS) and ApsaraDB RDS instances that you need, as well as the relationship between the resources. ROS automatically creates and configures all resources based on the template to implement automated deployment and O&M. For more information, see What is ROS?.

  • You can use ROS to call the API operations of Alibaba Cloud CDN. Resources that can be orchestrated by using ROS include regular resources and data resources.

Custom API encapsulation

Usage notes

If an error is returned after you call an API operation, check whether the request parameters and the parameter values are valid based on the returned error code. For more information, see Service error codes.

You can also use the Alibaba Cloud OpenAPI Diagnostics platform to perform self-service diagnostics based on the returned request ID or SDK error information.