:doc:`IAM <../../iam>` / Client / delete_login_profile

********************
delete_login_profile
********************



.. py:method:: IAM.Client.delete_login_profile(**kwargs)

  

  Deletes the password for the specified IAM user or root user, For more information, see `Managing passwords for IAM users <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html>`__.

   

  You can use the CLI, the Amazon Web Services API, or the **Users** page in the IAM console to delete a password for any IAM user. You can use `ChangePassword <https://docs.aws.amazon.com/IAM/latest/APIReference/API_ChangePassword.html>`__ to update, but not delete, your own password in the **My Security Credentials** page in the Amazon Web Services Management Console.

   

  .. warning::

     

    Deleting a user's password does not prevent a user from accessing Amazon Web Services through the command line interface or the API. To prevent all user access, you must also either make any access keys inactive or delete them. For more information about making keys inactive or deleting them, see `UpdateAccessKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateAccessKey.html>`__ and `DeleteAccessKey <https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteAccessKey.html>`__.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteLoginProfile>`_  


  **Request Syntax**
  ::

    response = client.delete_login_profile(
        UserName='string'
    )
    
  :type UserName: string
  :param UserName: 

    The name of the user whose password you want to delete.

     

    This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an `AssumeRoot <https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html>`__ session to omit the user name.

     

    This parameter allows (through its `regex pattern <http://wikipedia.org/wiki/regex>`__) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`IAM.Client.exceptions.EntityTemporarilyUnmodifiableException`

  
  *   :py:class:`IAM.Client.exceptions.NoSuchEntityException`

  
  *   :py:class:`IAM.Client.exceptions.LimitExceededException`

  
  *   :py:class:`IAM.Client.exceptions.ServiceFailureException`

  

  **Examples**

  The following command deletes the password for the IAM user named Bob.
  ::

    response = client.delete_login_profile(
        UserName='Bob',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  