// SetPassword changes the password for the specified user.
181062
func (c *Client) SetPassword(username, password string) error {
	if !names.IsValidUser(username) {
		return errors.Errorf("%q is not a valid username", username)
	}
	tag := names.NewUserTag(username)
	args := params.EntityPasswords{
		Changes: []params.EntityPassword{{
			Tag:      tag.String(),
			Password: password}},
	}
	var results params.ErrorResults
	err := c.facade.FacadeCall("SetPassword", args, &results)
	if err != nil {
		return err
	}
	return results.OneError()
}
292115
func (d *Domain) SetUserPassword(user string, password string, flags DomainSetUserPasswordFlags) error {
	if C.LIBVIR_VERSION_NUMBER < 1002015 {
		return makeNotImplementedError("virDomainSetUserPassword")
	}
	cuser := C.CString(user)
	cpassword := C.CString(password)

	defer C.free(unsafe.Pointer(cuser))
	defer C.free(unsafe.Pointer(cpassword))

	var err C.virError
	ret := C.virDomainSetUserPasswordWrapper(d.ptr, cuser, cpassword, C.uint(flags), &err)
	if ret == -1 {
		return makeError(&err)
	}

	return nil
}
849928
func (s *ResetUserPasswordInput) SetNewPassword(v string) *ResetUserPasswordInput {
	s.NewPassword = &v
	return s
}
716225
func (s *CreateComputerInput) SetPassword(v string) *CreateComputerInput {
	s.Password = &v
	return s
}
549827
func (s *CreateMicrosoftADInput) SetPassword(v string) *CreateMicrosoftADInput {
	s.Password = &v
	return s
}
146193
func (s *RedshiftDestinationUpdate) SetPassword(v string) *RedshiftDestinationUpdate {
	s.Password = &v
	return s
}
168641
func (s *JoinDomainInput) SetPassword(v string) *JoinDomainInput {
	s.Password = &v
	return s
}
663808
func (s *CreateClusterInput) SetMasterUserPassword(v string) *CreateClusterInput {
	s.MasterUserPassword = &v
	return s
}
1318873
func (s *ServiceAccountCredentials) SetAccountPassword(v string) *ServiceAccountCredentials {
	s.AccountPassword = &v
	return s
}
541244
func (m *Machine) SetPassword(password string) error {
	if len(password) < utils.MinAgentPasswordLength {
		return errors.Errorf("password is only %d bytes long, and is not a valid Agent password", len(password))
	}
	passwordHash := utils.AgentPasswordHash(password)
	op := m.UpdateOperation()
	op.PasswordHash = &passwordHash
	if err := m.st.ApplyOperation(op); err != nil {
		return errors.Trace(err)
	}
	m.doc.PasswordHash = passwordHash
	return nil
}
1298003
func (s *RdsDbInstance) SetDbPassword(v string) *RdsDbInstance {
	s.DbPassword = &v
	return s
}
1060057
func (s *EnableSsoInput) SetPassword(v string) *EnableSsoInput {
	s.Password = &v
	return s
}
1348002
func (s *PasswordPolicy) SetMaxPasswordAge(v int64) *PasswordPolicy {
	s.MaxPasswordAge = &v
	return s
}
188648
func (s *InputLocation) SetPasswordParam(v string) *InputLocation {
	s.PasswordParam = &v
	return s
}
694908
func (s *CreateDBInstanceInput) SetMasterUserPassword(v string) *CreateDBInstanceInput {
	s.MasterUserPassword = &v
	return s
}
405622
func (s *ModifyDBInstanceInput) SetMasterUserPassword(v string) *ModifyDBInstanceInput {
	s.MasterUserPassword = &v
	return s
}
103341
func (s *ModifyClusterInput) SetMasterUserPassword(v string) *ModifyClusterInput {
	s.MasterUserPassword = &v
	return s
}