Skip to content

ResetUserPassword

Source: src/AWS/DirectoryService/ResetUserPassword.ts

Runtime binding for the ResetUserPassword operation (IAM action ds:ResetUserPassword), scoped to one Directory.

Resets the password of any user in the bound Simple AD or Managed Microsoft AD directory — the backbone of a self-service password-reset function. NewPassword is sensitive; pass a Redacted value so it never leaks into logs. The directory id is injected from the binding. Provide the implementation with Effect.provide(AWS.DirectoryService.ResetUserPasswordHttp).

// init — bind the operation to the directory
const resetUserPassword = yield* AWS.DirectoryService.ResetUserPassword(directory);
// runtime
yield* resetUserPassword({
UserName: "jdoe",
NewPassword: Redacted.make("N3w-Secret!"),
});