内容分发网络CDN

    动态加速接口

    配置动态加速服务

    def test_set_dsa(c):
        """
        test set dsa
        """
        action = "enable"
        response = c.set_dsa(action)
        print(response)

    查询动态加速域名列表

    def test_get_dsa_domains(c):
        """
        get dsa domain list
        """
        response = c.get_dsa_domains()
        print(response)

    配置域名动态加速规则

    def test_set_domain_dsa(c):
        """
        test set domain dsa
        """
        dsa = {
            "enabled":True,
            "rules":[
                {
                    "type":"suffix",
                    "value":".mp4;.jpg;.php"
                },
                {
                    "type":"path",
                    "value":"/path"
                },
                {
                    "type":"exactPath",
                    "value":"/path/to/file.mp4"
                }
            ],
            "comment":"test"
        }
        domain = 'test-sdk.sys-qa.com'
        response = c.set_domain_dsa(domain, dsa);
        print(response)
    上一篇
    缓存管理
    下一篇
    统计接口(新版)