阅读本文,您可以获取 Java SDK 下行网络监控的接口调用示例,实现快速开发。
调用接口前,请先完成 Java SDK 的安装及初始化操作。
本节为您介绍下行网络监控相关接口的功能和调用示例。
您可以调用 DescribeImageXCdnSuccessRateByTime 接口指定查询维度获取下行网络监控的网络成功率时序数据。详细的参数说明可参见 DescribeImageXCdnSuccessRateByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXCdnSuccessRateByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXCdnSuccessRateByTimeBody body = new DescribeImageXCdnSuccessRateByTimeBody(); try { DescribeImageXCdnSuccessRateByTimeRes resp = service.describeImageXCdnSuccessRateByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXCdnSuccessRateAll 接口指定查询维度获取下行网络监控的网络成功率分布数据。详细的参数说明可参见 DescribeImageXCdnSuccessRateAll 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXCdnSuccessRateAllExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXCdnSuccessRateAllBody body = new DescribeImageXCdnSuccessRateAllBody(); try { DescribeImageXCdnSuccessRateAllRes resp = service.describeImageXCdnSuccessRateAll(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXCdnErrorCodeByTime 接口指定查询维度获取下行网络监控的错误码时序数据。详细的参数说明可参见 DescribeImageXCdnErrorCodeByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXCdnErrorCodeByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXCdnErrorCodeByTimeBody body = new DescribeImageXCdnErrorCodeByTimeBody(); try { DescribeImageXCdnErrorCodeByTimeRes resp = service.describeImageXCdnErrorCodeByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXCdnErrorCodeAll 接口指定查询维度来获取下行网络监控的错误码分布数据。详细的参数说明可参见 DescribeImageXCdnErrorCodeAll 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXCdnErrorCodeAllExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXCdnErrorCodeAllBody body = new DescribeImageXCdnErrorCodeAllBody(); try { DescribeImageXCdnErrorCodeAllRes resp = service.describeImageXCdnErrorCodeAll(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXCdnDurationDetailByTime 接口指定查询维度获取下行网络监控的网络耗时时序数据。详细的参数说明可参见 DescribeImageXCdnDurationDetailByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXCdnDurationDetailByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXCdnDurationDetailByTimeBody body = new DescribeImageXCdnDurationDetailByTimeBody(); try { DescribeImageXCdnDurationDetailByTimeRes resp = service.describeImageXCdnDurationDetailByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXCdnDurationAll 接口指定查询维度获取下行网络监控的网络耗时分布数据。详细的参数说明可参见 DescribeImageXCdnDurationAll 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXCdnDurationAllExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXCdnDurationAllBody body = new DescribeImageXCdnDurationAllBody(); try { DescribeImageXCdnDurationAllRes resp = service.describeImageXCdnDurationAll(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXCdnReuseRateByTime 接口指定查询维度获取下行网络监控的网络连接复用率时序数据。详细的参数说明可参见 DescribeImageXCdnReuseRateByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXCdnReuseRateByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXCdnReuseRateByTimeBody body = new DescribeImageXCdnReuseRateByTimeBody(); try { DescribeImageXCdnReuseRateByTimeRes resp = service.describeImageXCdnReuseRateByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXCdnReuseRateAll 接口指定查询维度获取下行网络监控的网络连接复用率分布数据。详细的参数说明可参见 DescribeImageXCdnReuseRateAll 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXCdnReuseRateAllExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXCdnReuseRateAllBody body = new DescribeImageXCdnReuseRateAllBody(); try { DescribeImageXCdnReuseRateAllRes resp = service.describeImageXCdnReuseRateAll(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXCdnProtocolRateByTime 接口指定查询维度获取下行网络监控的网络协议占比数据。详细的参数说明可参见 DescribeImageXCdnProtocolRateByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXCdnProtocolRateByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXCdnProtocolRateByTimeBody body = new DescribeImageXCdnProtocolRateByTimeBody(); try { DescribeImageXCdnProtocolRateByTimeRes resp = service.describeImageXCdnProtocolRateByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }