| | |
| | | // 标准版/企业版需要使用衍生算法,基础版请删除配置"withDerivedPredicate"; |
| | | .withDerivedPredicate(AbstractCredentials.DEFAULT_DERIVED_PREDICATE) // Used in derivative ak/sk authentication scenarios |
| | | .withAk(config.getAk()) |
| | | .withSk(config.getSk()); |
| | | .withSk(config.getSk()) |
| | | .withProjectId(config.getProjectId()); |
| | | return IoTDAClient.newBuilder() |
| | | .withCredential(auth) |
| | | // 标准版/企业版:需自行创建Region对象,基础版:请使用IoTDARegion的region对象,如"withRegion(IoTDARegion.CN_NORTH_4)" |
| | | .withRegion(new Region("cn-north-4", IotConstant.URL)) |
| | | .withRegion(new Region("cn-south-1", IotConstant.URL)) |
| | | .build(); |
| | | } |
| | | /** |
| | |
| | | .withSk(config.getSk()); |
| | | return IamClient.newBuilder() |
| | | .withCredential(auth) |
| | | .withRegion(IamRegion.valueOf("cn-north-4")) |
| | | .withRegion(IamRegion.valueOf("cn-south-1")) |
| | | .build(); |
| | | } |
| | | |