百度智能云

All Product Document

          CDN

          Getting Started

          1. Initialize a CdnClient

            CdnClient is a client that interacts with the CDN service. The CDN operations of the Python SDK are all done through CdnClient. To initialize a client, you can see Create CdnClient.

          2. View the list of accelerated domain name

            You can obtain the successfully created accelerated domain name list via list_domains ().

          3. Create/delete accelerated domain name

            The create_domain() method is used to create accelerated domain names. After it is created successfully, the CDN platform returns the newly generated CNAME record. After an accelerated domain name is created, you can query and modify it in subsequent operations.

            The delete_domain() method is used to delete accelerated domain names created.

          4. Start/stop the accelerated domain name

            The enable_domain() method is used to enable accelerated domain names.

            The disable_domain() method is used to disable accelerated domain names.

          5. Query and modify the configuration of the accelerated domain name

            • After creating accelerated domain names, you can get the detailed configuration information of the specified accelerated domain name through the get_domain_config() method;
            • Query the cache expiration policy of the domain name through get_domain_cache_ttl();
            • The user can modify the detailed configurations of the accelerated domain name through set_domain_origin() and configure flexible cache expiry strategy through set_domain_cache_ttl(), see Cache Configuration for strategy instructions, and execute access limitations to specific client through set_domain_referer_acl() and set_domain_ip_acl().
          6. Query domain name traffic

            You can query detailed access statistics through the get_domain_XXX_stat() interface, such as get_domain_pv_stat() to query pv, get_domain_flow_stat() to query traffic, get_domain_src _flow_stat() to query origin traffic, get_domain_hitrate_stat() to query hit rate and get_domain_httpcode_stat() to query status code statistics.

          7. Submit cache purging tasks

            To get one or more Objects, you can see Purge Cache.

          8. Submit cache preloading tasks

            To get one or more Objects, you can see Cache Preloading.

          9. Get the domain name access logs

            CDN provides users with complete log management and download features. You can get the log data of a specified domain name in a specified time period through API. Please see Get Access Logs.

          Previous
          SDK Installation Toolkit
          Next
          CdnClient