public void IdentityManagementServiceDeleteAccountAlias() { #region 7abeca65-04a8-4500-a890-47f1092bf766 var client = new AmazonIdentityManagementServiceClient(); var response = client.DeleteAccountAlias(new DeleteAccountAliasRequest { AccountAlias = "mycompany" }); #endregion }
public static void DeleteAccountAlias() { try { var iamClient = new AmazonIdentityManagementServiceClient(); var request = new DeleteAccountAliasRequest(); request.AccountAlias = "my-aws-account-alias-2017"; var response = iamClient.DeleteAccountAlias(request); if (response.HttpStatusCode.ToString() == "OK") { Console.WriteLine(request.AccountAlias + " deleted."); } else { Console.WriteLine("HTTpStatusCode returned = " + response.HttpStatusCode.ToString()); } } catch (NoSuchEntityException e) { Console.WriteLine(e.Message); } }