百度智能云

All Product Document

          CDN

          Dynamic Acceleration Interface

          Configure Dynamic Acceleration Service

          This interface is used to enable/disable the dynamic acceleration service. You can enable the dynamic acceleration service again after 00:00 the next day after you disable it.

          //"enable " means enabling the dynamic acceleration service, and “disable " means disabling it. 
          $action = array( 
              "action" => "enable" 
          ); 
          
          $resp = $this->client->setDsa($action); 
          
          print_r($resp); 

          Query Dynamic Acceleration Domain Name List

          $domain = "test-sdk.sys-qa.com"; 
          
          $resp = $this->client->getDomainDsa(); 
          
          print_r($resp); 

          Configure the Dynamic Acceleration Rules of Domain Name

          $dsa = array( 
              'dsa' => array( 
                  'enabled' => true, 
                  'rules' => array( 
                      array( 
                          'type' => 'suffix', 
                          'value' => '.mp4;.jpg;.php' 
                      ) 
                  ) 
              ) 
          ); 
          
          $domain = "test-sdk.sys-qa.com"; 
          
          $resp = $this->client->setDomainDsa($domain, $dsa); 
          
          print_r($resp); 
          Previous
          Cache Management
          Next
          Statistical Interface (new version)