Forward-to-origin configuration interface
Last Updated:2020-09-17
Update the Forward-to-origin Address of the Acceleration Domain Name
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);
}
Set Range Origin
public void setRangeSwitch(){
String domain="vd3.bdstatic.com";
SetRangeSwitchResponse response = cdnClient.setRangeSwitch(domain, true);
System.out.println(response);
}
Query Range Origin
public void getRangeSwitch(){
String domain="vd3.bdstatic.com";
GetRangeSwitchResponse response = cdnClient.getRangeSwitch(domain);
System.out.println(response);
}
Query Origin Protocol
public void getOriginProtocol(){
String domain="vd3.bdstatic.com";
GetOriginProtocolResponse response = cdnClient.getOriginProtocol(domain);
System.out.println(response);
}
Set Origin Protocol
public void setOriginProtocol(){
String domain="vd3.bdstatic.com";
OriginProtocol originProtocol=new OriginProtocol().withValue("http");
SetOriginProtocolResponse response = cdnClient.setOriginProtocol(domain, originProtocol);
System.out.println(response);
}
Set Mobile Access Control
public void setMobileAccess(){
String domain="vd3.bdstatic.com";
MobileAccess mobileAccess=new MobileAccess(true);
SetMobileAccessResponse response = cdnClient.setMobileAccess(domain, mobileAccess);
System.out.println(response);
}
Query Mobile Access Control
public void getMobileAccess(){
String domain="vd3.bdstatic.com";
GetMobileAccessResponse response = cdnClient.getMobileAccess(domain);
System.out.println(response);
}