Awso_cognito_idp.UserSourcerequired_attribute x ~name ~f looks for the attribute a named name in the attributes of x. If it is found, returns f applied to this attribute, otherwise returns an error message.
optional_attribute x ~f looks for the attribute satisfying f in the attributes of x. If it is found, returns f applied to this attribute, otherwise returns None.
email x looks for the email attribute of x. If it is found, returns the email string, otherwise returns an error message.
preferred_name x returns the value of the preferred_name attribute of x if it exists, otherwise returns None.
family_name x looks for the family_name attribute of x. If it is found, returns the family_name string, otherwise returns an error message.
name x returns the value of the name attribute of x if it exists, otherwise returns None.