百度智能云

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 Java SDK are all done through CdnClient. To initialize a client, you can see Create a CdnClient.

          2. Create an accelerated domain name

            CdnClient provides the createDomain() method 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.

          3. View the list of accelerated domain name

            After creating accelerated domain names, you can get the list of accelerated domain names which are created successfully by listDomains().

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

            After creating an accelerated domain name, you can get the detailed configuration information of the specified accelerated domain name through getDomainConfig(), enable and disable the accelerated domain name through disableDomain()/enableDomain(), or delete the specified domain name through deleteDomain(). The user can modify the detailed configurations of the accelerated domain name through setDomainOrigin(); setDomainCacheTTL() is configured with flexible cache expiry strategy, the instructions of which can refer to Cache Configurations, and access limitations can be executed to the specific clients through setDomainRefererACL() and setDomainIpACL().

          5. Query domain name traffic

            You can query detailed access statistics through the getStatXX interface, such as getStatPv() to query pv, getStatFlow() to query traffic, getStatSrcFlow() to query origin traffic, getStatHitRate() to query hit rate and getStatHttpCode () to query status code statistics.

          6. Submit cache purging task

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

          7. Submit cache preloading tasks

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

          8. 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