Search in sources :

Example 1 with ListConfigRequest

use of com.aliyun.openservices.log.request.ListConfigRequest in project opscloud4 by ixrjog.

the class AliyunLogDriver method listConfig.

public List<String> listConfig(AliyunConfig.Aliyun aliyun, String project, String logstore) {
    int offset = 0;
    ListConfigRequest req = new ListConfigRequest(project, offset, QUERY_SIZE);
    req.SetLogstoreName(logstore);
    try {
        Client client = buildClient(aliyun);
        return client.ListConfig(req).GetConfigs();
    } catch (LogException lg) {
        log.error("阿里云日志服务查询Config错误! , {}", lg.GetErrorMessage());
    }
    return Collections.emptyList();
}
Also used : ListConfigRequest(com.aliyun.openservices.log.request.ListConfigRequest) Client(com.aliyun.openservices.log.Client) LogException(com.aliyun.openservices.log.exception.LogException)

Aggregations

Client (com.aliyun.openservices.log.Client)1 LogException (com.aliyun.openservices.log.exception.LogException)1 ListConfigRequest (com.aliyun.openservices.log.request.ListConfigRequest)1