
example.ListUsersExample Maven / Gradle / Ivy
package example;
import com.alibaba.fastjson.JSON;
import common.Credential;
import client.iam.listusers.v20151101.ListUsersClient;
import client.iam.listusers.v20151101.ListUsersRequest;
import client.iam.listusers.v20151101.ListUsersResponse;
import lombok.extern.slf4j.Slf4j;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
/**
* @Classname ListUsersExample
* @Description Example
*/
@Slf4j
public class ListUsersExample {
public static void main(String[] args) {
//证书
Credential credential = new Credential("secretKey", "signStr", "region");
ListUsersClient client = new ListUsersClient(credential);
ListUsersRequest request = new ListUsersRequest();
request.setMarker("1");
try {
ListUsersResponse ListUsersResponse = client.doGet("iam.api.ksyun.com", request);
log.info("ListUsers result:{}", JSON.toJSON(ListUsersResponse));
} catch (Exception e) {
log.error("ListUsers occur error", e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy