Search in sources :

Example 11 with Config

use of com.aliyun.teaopenapi.models.Config in project opscloud4 by ixrjog.

the class AliyunDmsClient method createMyClient.

public static DmsClient createMyClient(AliyunConfig.Aliyun aliyun) throws Exception {
    Config config = new Config().setAccessKeyId(aliyun.getAccount().getAccessKeyId()).setAccessKeySecret(aliyun.getAccount().getSecret());
    // 访问的域名
    config.endpoint = Optional.of(aliyun).map(AliyunConfig.Aliyun::getDms).map(AliyunConfig.Dms::getEndpoint).orElse(AliyunConfig.DMS_ENDPOINT);
    return new DmsClient(config);
}
Also used : AliyunConfig(com.baiyi.opscloud.common.datasource.AliyunConfig) Config(com.aliyun.teaopenapi.models.Config) AliyunConfig(com.baiyi.opscloud.common.datasource.AliyunConfig)

Example 12 with Config

use of com.aliyun.teaopenapi.models.Config in project eladmin by lWoHvYe.

the class DySMSUtil method createClient.

@SneakyThrows
public static Client createClient() {
    Config config = new Config();
    config.accessKeyId = AliCloudConfig.ACCESS_KEY_ID;
    config.accessKeySecret = AliCloudConfig.ACCESS_KEY_SECRET;
    return new Client(config);
}
Also used : AliCloudConfig(com.lwohvye.config.AliCloudConfig) Config(com.aliyun.teaopenapi.models.Config) Client(com.aliyun.dysmsapi20170525.Client) SneakyThrows(lombok.SneakyThrows)

Example 13 with Config

use of com.aliyun.teaopenapi.models.Config in project dingtalk-app-server by nju-softeng.

the class ScheduleApi method createCalenderClient.

private static com.aliyun.dingtalkcalendar_1_0.Client createCalenderClient() throws Exception {
    Config config = new Config();
    config.protocol = "https";
    config.regionId = "central";
    return new com.aliyun.dingtalkcalendar_1_0.Client(config);
}
Also used : Config(com.aliyun.teaopenapi.models.Config)

Aggregations

Config (com.aliyun.teaopenapi.models.Config)13 Client (com.aliyun.dysmsapi20170525.Client)4 Client (com.aliyun.ons20190214.Client)2 OnsTopicListRequest (com.aliyun.ons20190214.models.OnsTopicListRequest)2 OnsTopicListResponse (com.aliyun.ons20190214.models.OnsTopicListResponse)2 AliyunConfig (com.baiyi.opscloud.common.datasource.AliyunConfig)2 ServiceException (cn.lili.common.exception.ServiceException)1 Setting (cn.lili.modules.system.entity.dos.Setting)1 SmsSetting (cn.lili.modules.system.entity.dto.SmsSetting)1 SendSmsRequest (com.aliyun.dysmsapi20170525.models.SendSmsRequest)1 OnsGroupListRequest (com.aliyun.ons20190214.models.OnsGroupListRequest)1 OnsGroupListResponse (com.aliyun.ons20190214.models.OnsGroupListResponse)1 OSSClient (com.aliyun.oss.OSSClient)1 DefaultDingTalkClient (com.dingtalk.api.DefaultDingTalkClient)1 DingTalkClient (com.dingtalk.api.DingTalkClient)1 Gson (com.google.gson.Gson)1 AliCloudConfig (com.lwohvye.config.AliCloudConfig)1 CloudSDKException (com.mizhousoft.cloudsdk.CloudSDKException)1 SmsConfig (com.tansci.config.SmsConfig)1 AliAccountNotFoundException (com.wingice.msg.ali.exception.AliAccountNotFoundException)1