DeleteLoginProfileAsync() 공개 메소드

Initiates the asynchronous execution of the DeleteLoginProfile operation.
public DeleteLoginProfileAsync ( DeleteLoginProfileRequest request, System cancellationToken = default(CancellationToken) ) : Task
request Amazon.IdentityManagement.Model.DeleteLoginProfileRequest Container for the necessary parameters to execute the DeleteLoginProfile operation.
cancellationToken System /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. ///
리턴 Task
예제 #1
0
        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();
                }
            });
        }