use of com.qcloud.cos.model.fetch.GetAsyncFetchTaskRequest in project cos-java-sdk-v5 by tencentyun.
the class GetAsyncFetchTaskDemo method getAsyncFetchTask.
public static void getAsyncFetchTask() {
EndpointBuilder builder = new UserSpecifiedEndpointBuilder(String.format("%s.migration.myqcloud.com", region), "service.cos.myqcloud.com");
COSClient cosClient = createCosClient();
cosClient.getClientConfig().setEndpointBuilder(builder);
GetAsyncFetchTaskRequest request = new GetAsyncFetchTaskRequest();
request.setBucketName(bucketName);
request.setTaskId(taskId);
GetAsyncFetchTaskResult result = cosClient.getAsyncFetchTask(request);
System.out.println(result.getCosRequestId());
System.out.println(result.getCode());
System.out.println(result.getMessage());
System.out.println(result.getRequestId());
for (Entry<String, String> entry : result.getData().entrySet()) {
System.out.println(entry.getKey());
System.out.println(entry.getValue());
}
}
Aggregations