CDN command line interface

Last Updated: May 17, 2017

aliyuncli installation

aliyuncli is a tool based on Alibaba Cloud open APIs that is used to manage your Alibaba Cloud products. aliyuncli commands correspond to Alibaba Cloud open APIs in a one-to-one manner, and delivers robust flexibility and scalability at an equal capacity. Based on aliyuncli, you can encapsulate Alibaba Cloud atomic APIs to obtain your desired functions.

The pip-installed aliyuncli will automatically process various dependencies.

  • Install aliyuncli directly using the following command:

    1. $sudo pip install aliyuncli
  • aliyuncli upgrades:

    1. $sudo pip install --upgrade aliyuncli

For more information about aliyuncli, refer to Alibaba Cloud CLI.

CDN SDK installation

The CDN SDK must be installed because CDN functions are used alongside it.

It is strongly recommended to install SDKs using pip because the SDK will automatically process various dependencies and upgrades.

  • Install the CDN SDK directly using the following command:

    1. $ sudo pip install aliyun-python-sdk-cdn
  • SDK upgrades:

    1. $ sudo pip install --upgrade aliyun-python-sdk-cdn

aliyuncli CDN command descriptions

The following section details instructions and examples of CDN commands.

Service operation commands


  • Command instructions:

    Domain name operations can only be performed after the CDN service has been activated. A single user can only activate the service once. The account will activate only if it has been verified with real-name authentication.

  • Example:

    1. aliyuncli cdn OpenCdnService --InternetChargeType PayByTraffic


  • Command instructions:

    Querying the CDN service status will include the current billing type, service activation time, the billing type that will take effect next, and the current service status.

  • Example:

    1. aliyuncli cdn DescribeCdnService


  • Command instructions:

    Changes the CDN service billing type.

  • Example:

    1. aliyuncli cdn ModifyCdnService --InternetChargeType PayByTraffic

For more details about APIs, refer to API Reference.

Thank you! We've received your feedback.