Search in sources :

Example 1 with DeleteAccountAliasResult

use of com.amazonaws.services.identitymanagement.model.DeleteAccountAliasResult 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);
}
Also used : DeleteAccountAliasResult(com.amazonaws.services.identitymanagement.model.DeleteAccountAliasResult) DeleteAccountAliasRequest(com.amazonaws.services.identitymanagement.model.DeleteAccountAliasRequest) AmazonIdentityManagement(com.amazonaws.services.identitymanagement.AmazonIdentityManagement)

Aggregations

AmazonIdentityManagement (com.amazonaws.services.identitymanagement.AmazonIdentityManagement)1 DeleteAccountAliasRequest (com.amazonaws.services.identitymanagement.model.DeleteAccountAliasRequest)1 DeleteAccountAliasResult (com.amazonaws.services.identitymanagement.model.DeleteAccountAliasResult)1