use of com.amazonaws.services.identitymanagement.model.CreateAccountAliasResult in project aws-doc-sdk-examples by awsdocs.
the class CreateAccountAlias method main.
public static void main(String[] args) {
final String USAGE = "To run this example, supply an alias\n" + "Ex: CreateAccountAlias <alias>\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String alias = args[0];
final AmazonIdentityManagement iam = AmazonIdentityManagementClientBuilder.defaultClient();
CreateAccountAliasRequest request = new CreateAccountAliasRequest().withAccountAlias(alias);
CreateAccountAliasResult response = iam.createAccountAlias(request);
System.out.println("Successfully created account alias: " + alias);
}
Aggregations