内容分发网络CDN

    回源配置接口

    更新加速域名回源地址

     public void testSetDomainOrigin() {
            SetDomainOriginRequest request = new SetDomainOriginRequest().withDomain(DOMAIN);
            ArrayList<OriginPeer> origin = new ArrayList<OriginPeer>();
            origin.add(new OriginPeer().withPeer("1.2.3.4").withHost("a.com"));
            origin.add(new OriginPeer().withPeer("2.3.4.5").withHost("a.com"));
            request.setOrigin(origin);
            SetDomainOriginResponse response = cdnClient.setDomainOrigin(request);
            System.out.println(response);
        }

    设置Range回源

    public void setRangeSwitch(){
            String domain="vd3.bdstatic.com";
            SetRangeSwitchResponse response = cdnClient.setRangeSwitch(domain, true);
            System.out.println(response);
        }

    查询Range回源

     public void getRangeSwitch(){
            String domain="vd3.bdstatic.com";
            GetRangeSwitchResponse response = cdnClient.getRangeSwitch(domain);
            System.out.println(response);
        }

    查询回源协议

    public void getOriginProtocol(){
            String domain="vd3.bdstatic.com";
            GetOriginProtocolResponse response = cdnClient.getOriginProtocol(domain);
            System.out.println(response);
        }

    设置回源协议

    public void setOriginProtocol(){
            String domain="vd3.bdstatic.com";
            OriginProtocol originProtocol=new OriginProtocol().withValue("http");
            SetOriginProtocolResponse response = cdnClient.setOriginProtocol(domain, originProtocol);
            System.out.println(response);
        }

    设置移动访问控制

     public void setMobileAccess(){
            String domain="vd3.bdstatic.com";
            MobileAccess mobileAccess=new MobileAccess(true);
            SetMobileAccessResponse response = cdnClient.setMobileAccess(domain, mobileAccess);
            System.out.println(response);
        }

    查询移动访问控制

     public void getMobileAccess(){
            String domain="vd3.bdstatic.com";
            GetMobileAccessResponse response = cdnClient.getMobileAccess(domain);
            System.out.println(response);
        }
    上一篇
    访问配置接口
    下一篇
    证书关联操作