reset_user_password
async
¶
reset_user_password(
directory_id: DirectoryId,
user_name: CustomerUserName,
new_password: UserPassword,
*,
config_overrides: Optional[AsyncDirectoryServiceClientConfig] = None,
) -> ResetUserPasswordResult
Resets the password for any user in your Managed Microsoft AD or Simple AD directory. Disabled users will become enabled and can be authenticated following the API call.
You can reset the password for any user in your directory with the following exceptions:
-
For Simple AD, you cannot reset the password for any user that is a member of either the Domain Admins or Enterprise Admins group except for the administrator user.
-
For Managed Microsoft AD, you can only reset the password for a user that is in an OU based off of the NetBIOS name that you typed when you created your directory. For example, you cannot reset the password for a user in the Amazon Web Services Reserved OU. For more information about the OU structure for an Managed Microsoft AD directory, see What Gets Created in the Directory Service Administration Guide.
Parameters:
-
directory_id(DirectoryId) –Identifier of the Managed Microsoft AD or Simple AD directory in which the user resides.
-
user_name(CustomerUserName) –The user name of the user whose password will be reset.
-
new_password(UserPassword) –The new password that will be reset.
Raises:
-
ClientException–A client exception has occurred.
-
DirectoryUnavailableException–The specified directory is unavailable.
-
EntityDoesNotExistException–The specified entity could not be found.
-
InvalidPasswordException–The new password provided by the user does not meet the password complexity requirements defined in your directory.
-
ServiceException–An exception has occurred in Directory Service.
-
UnsupportedOperationException–The operation is not supported.
-
UserDoesNotExistException–The user provided a username that does not exist in your directory.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_directory_service/_services/async_directory_service.py
5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 | |