阅读本文,您可以获取 Java SDK 数据监控的接口调用示例,实现快速开发。
调用接口前,请先完成 Java SDK 的安装及初始化操作。
本节为您介绍数据监控相关接口的功能和调用示例。
您可以调用 DescribeImageXEdgeRequest 接口获取指定时间段的边缘请求次数。详细的参数说明可参见 DescribeImageXEdgeRequest 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXEdgeRequestExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXEdgeRequestQuery query = new DescribeImageXEdgeRequestQuery(); try { DescribeImageXEdgeRequestRes resp = service.describeImageXEdgeRequest(query); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXEdgeRequestBandwidth 接口获取指定时间段的边缘分发带宽用量。详细的参数说明可参见 DescribeImageXEdgeRequestBandwidth 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXEdgeRequestBandwidthExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXEdgeRequestBandwidthQuery query = new DescribeImageXEdgeRequestBandwidthQuery(); try { DescribeImageXEdgeRequestBandwidthRes resp = service.describeImageXEdgeRequestBandwidth(query); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXEdgeRequestTraffic 接口获取指定时间段的边缘分发流量用量。详细的参数说明可参见 DescribeImageXEdgeRequestTraffic 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXEdgeRequestTrafficExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXEdgeRequestTrafficQuery query = new DescribeImageXEdgeRequestTrafficQuery(); try { DescribeImageXEdgeRequestTrafficRes resp = service.describeImageXEdgeRequestTraffic(query); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXMirrorRequestBandwidth 接口获取指定时间段的镜像回源带宽。详细的参数说明可参见 DescribeImageXMirrorRequestBandwidth 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXMirrorRequestBandwidthExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXMirrorRequestBandwidthBody body = new DescribeImageXMirrorRequestBandwidthBody(); try { DescribeImageXMirrorRequestBandwidthRes resp = service.describeImageXMirrorRequestBandwidth(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXMirrorRequestTraffic 接口获取指定时间段的镜像回源流量。详细的参数说明可参见 DescribeImageXMirrorRequestTraffic 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXMirrorRequestTrafficExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXMirrorRequestTrafficBody body = new DescribeImageXMirrorRequestTrafficBody(); try { DescribeImageXMirrorRequestTrafficRes resp = service.describeImageXMirrorRequestTraffic(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXMirrorRequestHttpCodeByTime 接口获取指定时间段的镜像回源请求次时序数据。详细的参数说明可参见 DescribeImageXMirrorRequestHttpCodeByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXMirrorRequestHttpCodeByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXMirrorRequestHttpCodeByTimeBody body = new DescribeImageXMirrorRequestHttpCodeByTimeBody(); try { DescribeImageXMirrorRequestHttpCodeByTimeRes resp = service.describeImageXMirrorRequestHttpCodeByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXMirrorRequestHttpCodeOverview 接口获取指定时间段的镜像回源请求次域名明细数据。详细的参数说明可参见 DescribeImageXMirrorRequestHttpCodeOverview 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXMirrorRequestHttpCodeOverviewExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXMirrorRequestHttpCodeOverviewBody body = new DescribeImageXMirrorRequestHttpCodeOverviewBody(); try { DescribeImageXMirrorRequestHttpCodeOverviewRes resp = service.describeImageXMirrorRequestHttpCodeOverview(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXEdgeRequestRegions 接口获取指定时间段的边缘分发数据的地区列表。详细的参数说明可参见 DescribeImageXEdgeRequestRegions 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXEdgeRequestRegionsExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXEdgeRequestRegionsQuery query = new DescribeImageXEdgeRequestRegionsQuery(); try { DescribeImageXEdgeRequestRegionsRes resp = service.describeImageXEdgeRequestRegions(query); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXServerQPSUsage 接口获取指定时间段的数据处理服务 QPS 用量。详细的参数说明可参见 DescribeImageXServerQPSUsage 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXServerQPSUsageExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXServerQPSUsageQuery query = new DescribeImageXServerQPSUsageQuery(); try { DescribeImageXServerQPSUsageRes resp = service.describeImageXServerQPSUsage(query); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }