use of com.tencentcloudapi.sts.v20180813.StsClient in project cloud-sdk by mizhousoft.
the class TencentOCRServiceImpl method init.
public void init(OCRProfile config) throws CloudSDKException {
validate(config);
Credential cred = new Credential(config.getAccessKey(), config.getSecretKey());
StsClient cosClient = new StsClient(cred, config.getRegion());
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("ocr.tencentcloudapi.com");
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
OcrClient ocrClient = new OcrClient(cred, config.getRegion(), clientProfile);
this.cosClient = cosClient;
this.ocrClient = ocrClient;
LOG.info("Init sts and ocr client successfully.");
}
Aggregations