阅读本文,您可以获取 Java SDK 上传数据监控的接口调用示例,实现快速开发。
调用接口前,请先完成 Java SDK 的安装及初始化操作。
本节为您介绍上传数据监控相关接口的功能和调用示例。
您可以调用 DescribeImageXUploadSuccessRateByTime 接口指定查询维度查询上传成功率及数据对应时间点。详细的参数说明可参见 DescribeImageXUploadSuccessRateByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXUploadSuccessRateByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXUploadSuccessRateByTimeBody body = new DescribeImageXUploadSuccessRateByTimeBody(); try { DescribeImageXUploadSuccessRateByTimeRes resp = service.describeImageXUploadSuccessRateByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXUploadErrorCodeAll 接口指定查询维度查询错误码详细数据。详细的参数说明可参见 DescribeImageXUploadErrorCodeAll 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXUploadErrorCodeAllExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXUploadErrorCodeAllBody body = new DescribeImageXUploadErrorCodeAllBody(); try { DescribeImageXUploadErrorCodeAllRes resp = service.describeImageXUploadErrorCodeAll(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXUploadErrorCodeByTime 接口指定查询维度来获取上传数据中的错误码信息以及时序数据。详细的参数说明可参见 DescribeImageXUploadErrorCodeByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXUploadErrorCodeByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXUploadErrorCodeByTimeBody body = new DescribeImageXUploadErrorCodeByTimeBody(); try { DescribeImageXUploadErrorCodeByTimeRes resp = service.describeImageXUploadErrorCodeByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXUploadCountByTime 接口指定查询维度来获取上传数据中的有效上传次数数据。详细的参数说明可参见 DescribeImageXUploadCountByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXUploadCountByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXUploadCountByTimeBody body = new DescribeImageXUploadCountByTimeBody(); try { DescribeImageXUploadCountByTimeRes resp = service.describeImageXUploadCountByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXUploadFileSize 接口指定查询维度来获取上传数据中的上传文件大小数据。详细的参数说明可参见 DescribeImageXUploadFileSize 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXUploadFileSizeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXUploadFileSizeBody body = new DescribeImageXUploadFileSizeBody(); try { DescribeImageXUploadFileSizeRes resp = service.describeImageXUploadFileSize(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXUploadSpeed 接口指定查询维度来获取上传数据中的上传平均速度数据。详细的参数说明可参见 DescribeImageXUploadSpeed 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXUploadSpeedExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXUploadSpeedBody body = new DescribeImageXUploadSpeedBody(); try { DescribeImageXUploadSpeedRes resp = service.describeImageXUploadSpeed(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXUploadDuration 接口指定查询维度来获取上传数据中的上传平均耗时数据。详细的参数说明可参见 DescribeImageXUploadDuration 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXUploadDurationExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXUploadDurationBody body = new DescribeImageXUploadDurationBody(); try { DescribeImageXUploadDurationRes resp = service.describeImageXUploadDuration(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXUploadSegmentSpeedByTime 接口查询时间段和时间粒度获取 2.0 模式下的上传分片速度。详细的参数说明可参见 DescribeImageXUploadSegmentSpeedByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXUploadSegmentSpeedByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXUploadSegmentSpeedByTimeBody body = new DescribeImageXUploadSegmentSpeedByTimeBody(); try { DescribeImageXUploadSegmentSpeedByTimeRes resp = service.describeImageXUploadSegmentSpeedByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }