try{
String SecretId = "***";
String SecretKey = "***";
Credential cred = new Credential(SecretId, SecretKey);
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("cvm.tencentcloudapi.com");
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
CvmClient client = new CvmClient(cred, "ap-seoul", clientProfile);
DescribeZonesRequest req = new DescribeZonesRequest();
DescribeZonesResponse resp = client.DescribeZones(req);
System.out.println(DescribeZonesResponse.toJsonString(resp));
} catch (TencentCloudSDKException e) {
System.out.println(e.toString());
}
上面是腾讯云java sdk demo,我把SecretId和SecretKey替换成我的了。
报错如下,尝试过其他接口也是报下面的错误
相似问题