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
4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 | |