Module Awso_cognito_idp_async.UtilSource

A high level Cognito IDP API. Simplifies some of the complexity of the native AWS types and provides a more natural ocaml style interface to some commonly used AWS functions which are otherhwise just code generated directly from the boto service files.

Sourcemodule User : module type of Awso_cognito_idp.User
Sourceval list_user_pools : Awso.Cfg.t -> ?max_results:int -> unit -> Awso_cognito_idp.Values.ListUserPoolsResponse.t Async.Deferred.t

Produces `Ok response containing the user pools, or a listUserPools_error upon failure.

Sourceval user_pools_to_string : Awso_cognito_idp.Values.UserPoolListType.t -> string

Produces a json string representation give an AWS user pools type.

Sourceexception Get_user_error of {
  1. message : string option;
  2. cause : get_user_error;
}
Sourceval get_user_failwith : ?message:string -> get_user_error -> 'a

Convenience function to wrap a getUser_error into an exception type a raise it. An optional message can be added to the exception to provide additional context

Sourceval get_user : ?retry_delay:Time_float_unix.Span.t -> ?retry_cnt:int -> Awso.Cfg.t -> access_token:Base.string -> unit -> (User.t, get_user_error) Core.result Async.Deferred.t

Produces `Ok user given an access_token representing a valid, authenticated cognito user, or a getUser_error upon failure.

Sourceval admin_get_user : ?retry_delay:Time_float_unix.Span.t -> ?retry_cnt:int -> Awso.Cfg.t -> user_pool_id:string -> username:string -> unit -> (User.t, Awso_cognito_idp.Values.AdminGetUserResponse.error) Core.result Async.Deferred.t

Produces `Ok user given a user_pool_id and username, authenticated cognito user, or a getUser_error upon failure.