工具接口
更新时间:2023-05-16
IP检测
验证指定的IP是否属于百度智能云CDN服务节点。
public void describeIp(CdnClient client){
String ip = "1.3.5.6";
DescribeIpResponse response = cdnClient.describeIp(ip);
System.out.println(response);
}
验证指定的IP列表是否是百度智能云CDN节点
public void describeIps(CdnClient client){
String ip = "1.3.5.6";
List<String> ips = new ArrayList<String>();
ips.add(ip);
DescribeIpRequest describeIpRequest = new DescribeIpRequest().withIps(ips);
DescribeIpsResponse response = cdnClient.describeIps(describeIpRequest);
System.out.println(response);
}
回源IP地址段查询接口
查询百度智能云CDN回源IP地址段。
public void getNodeList(CdnClient client){
GetNodeListResponse response = cdnClient.getNodeList();
System.out.println(response);
}
URL封禁相关接口
QUOTA查询接口
public void getForbiddenQuota(CdnClient client){
GetForbiddenQuota response = cdnClient.getForbiddenQuota();
System.out.println(response);
}
URL封禁列表查询接口
public void getForbiddenUrls(CdnClient client){
GetForbiddenUrlsResponse response = cdnClient.getForbiddenUrls(new GetForbiddenUrlsRequest());
System.out.println(response);
}
URL封禁操作记录查询
public void getForbiddenOperateHistories(CdnClient client){
GetForbiddenOperateHistoriesResponse response =
cdnClient.getForbiddenOperateHistories(new GetForbiddenOperateHistoriesRequest());
System.out.println(response);
}
URL封禁接口
public void setForbiddenBan(CdnClient client){
String url = "https://www.test.com/case.xml";
CdnResponse response = cdnClient.setForbiddenBan(new SetForbiddenUrlsRequest()
.withUrls(Arrays.asList(url)));
System.out.println(response);
}
URL解封禁接口
public void setForbiddenUnBan(CdnClient client){
String url = "https://www.test.com/case.xml";
CdnResponse response = cdnClient.setForbiddenUnBan(new SetForbiddenUrlsRequest()
.withUrls(Arrays.asList(url)));
System.out.println(response);
}