public DeleteUserAsync ( |
||
request | Container for the necessary parameters to execute the DeleteUser operation. | |
cancellationToken | System | /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// |
리턴 | Task |
public static void DeleteTestUsers(AmazonIdentityManagementServiceClient client, params string[] usernames) { UtilityMethods.WaitUntilSuccess(() => { foreach (string s in usernames) { DeleteAccessKeysForUser(client, s); DeleteUserPoliciesForUser(client, s); DeleteCertificatesForUser(client, s); try { client.DeleteLoginProfileAsync(new DeleteLoginProfileRequest() { UserName = s }).Wait(); } catch { } client.DeleteUserAsync(new DeleteUserRequest() { UserName = s }).Wait(); } }); }