阿里云监控服务-SDK手册-D

阿里云监控服务-SDK手册-D

ID:35885662

大小:141.78 KB

页数:15页

时间:2019-04-22

阿里云监控服务-SDK手册-D_第1页
阿里云监控服务-SDK手册-D_第2页
阿里云监控服务-SDK手册-D_第3页
阿里云监控服务-SDK手册-D_第4页
阿里云监控服务-SDK手册-D_第5页
资源描述:

《阿里云监控服务-SDK手册-D》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、云监控新版SDK使用手册云监控/新版SDK使用手册新版SDK使用手册SDK使用手册SDK安装com.aliyunaliyun-java-sdk-core2.1.9com.aliyunaliyun-java-sdk-cms

2、3.1.0通过maven进行安装,需要添加的依赖如下:SDK下载可通过以下地址直接下载最新版本SDK请下载3.1.0版下载地址:https://oss.sonatype.org/#nexus-search;quick~aliyun-java-sdk-cmsGithub下载地址,文件夹为aliyun-java-sdk-cms:https://github.com/aliyun/aliyun

3、-openapi-java-sdk测试代码使用时请将如下示例中的accessKey和accessSecret替换成您的AccessKeyimportjava.io.UnsupportedEncodingException;importjava.text.SimpleDateFormat;importjava.util.Calendar;importorg.junit.Before;14云监控/新版SDK使用手册importorg.junit.Test;importcom.aliyuncs.AcsRespo

4、nse;importcom.aliyuncs.DefaultAcsClient;importcom.aliyuncs.IAcsClient;importcom.aliyuncs.RpcAcsRequest;importcom.aliyuncs.cms.model.v20151020.DescribeMetricDatumRequest;importcom.aliyuncs.cms.model.v20151020.DescribeMetricDatumResponse;importcom.aliyuncs.

5、cms.model.v20151020.QueryMetricRequest;importcom.aliyuncs.cms.model.v20151020.QueryMetricResponse;importcom.aliyuncs.exceptions.ClientException;importcom.aliyuncs.http.FormatType;importcom.aliyuncs.http.HttpResponse;importcom.aliyuncs.profile.DefaultProfi

6、le;importcom.aliyuncs.profile.IClientProfile;publicclassSnippet{IAcsClientclient=null;@Beforepublicvoidinit()throwsClientException{//测试IClientProfileprofile=DefaultProfile.getProfile("cn-hangzhou","","");client=newDefaultAcsClient

7、(profile);//System.setProperty("http.proxyHost","10.189.195.249");////此设置用于设置代理,用fiddler拦截查看http请求,便于调试。10.189.195.249是云监控开发测试机,联调时可以打开此选项,由云监控人员直接trace。//System.setProperty("http.proxyPort","8888");}protectedKex

8、ecute(Trequest){try{//todosomething.request.setContentType(FormatType.JSON);request.setAcceptFormat(FormatType.JSON);doAction(request);AcsResponseresponse=client.getAcsResponse(request);return(K)response;}catch(Clie

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。