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