Initializing the Client of the GES Management Plane
When using the GES SDK tool to access the GES management plane, you need to initialize the GES client. Both AK/SK and token authentication modes are supported for initializing the client. The sample code is as follows:
- Sample code for AK/SK authentication
String ak = "ak"; String sk = "sk"; String regionName = "regionname"; String projectId = "project_id"; GesInfo gesInfo = new GesInfo(regionName, ak, sk, projectId); GesClient client = new GesClient(AuthenticationMode.AKSK, gesInfo);
- Sample code for token authentication
String domainName = "domainname"; String userName = "username"; String password = "password"; String regionName = "regionname"; String projectId = "project_id"; GesInfo gesInfo = new GesInfo(regionName, domainName, userName, password, projectId); GesClient client = new GesClient(AuthenticationMode.TOKEN, gesInfo);
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.