use of com.amazonaws.services.identitymanagement.model.CreateUserResult in project aws-doc-sdk-examples by awsdocs.
the class CreateUser method main.
public static void main(String[] args) {
final String USAGE = "To run this example, supply a username\n" + "Ex: CreateUser <username>\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String username = args[0];
final AmazonIdentityManagement iam = AmazonIdentityManagementClientBuilder.defaultClient();
CreateUserRequest request = new CreateUserRequest().withUserName(username);
CreateUserResult response = iam.createUser(request);
System.out.println("Successfully created user: " + response.getUser().getUserName());
}
Aggregations