reset_user_password
¶
reset_user_password(
directory_id: DirectoryId,
user_name: CustomerUserName,
new_password: UserPassword,
*,
config_overrides: Optional[DirectoryServiceClientConfig] = 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/directory_service.py
4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 | |