Databases.Database_aadDatabase_aad connects with SDK-managed Microsoft Entra ID client credentials. The first request acquires a token from https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token; the token is cached and refreshed before expiry. The service principal needs a data-plane role assignment (e.g. Cosmos DB Built-in Data Contributor); control-plane roles do not apply.
val list_databases :
?timeout:float ->
unit ->
(int * Cosmos.Json_converter_t.list_databases, Database_intf.cosmos_error)
Stdlib.result
Lwt.tlist_databases returns a list of databases
val create :
?timeout:float ->
string ->
(int * Cosmos.Json_converter_t.database option, Database_intf.cosmos_error)
Stdlib.result
Lwt.tcreate database_name creates a database in Cosmos with name database_name.
val create_if_not_exists :
?timeout:float ->
string ->
(int * Cosmos.Json_converter_t.database option, Database_intf.cosmos_error)
Stdlib.result
Lwt.tcreate_if_not_exists database_name creates a database in Cosmos with name database_name if it not already exists.
val get :
?timeout:float ->
string ->
(int * Cosmos.Json_converter_t.database option, Database_intf.cosmos_error)
Stdlib.result
Lwt.tget database_name returns info about the database
val delete :
?timeout:float ->
string ->
(int, Database_intf.cosmos_error) Stdlib.result Lwt.tdelete database_name deletes the database database_name from Cosmos
module Collection : sig ... endmodule User : sig ... endmodule Permission : sig ... endmodule Offer : sig ... end