key: For cosmos_mongo_endpoint, a string containing the access key (password) for the endpoint. Can be either a read-write or read-only key.
mongo_options: For cosmos_mongo_endpoint, a named list containing any additional parameters for the MongoDB connection string.
connection_string: Alternatively, the full connection string for the MongoDB endpoint. If this is supplied, all other arguments to cosmos_mongo_endpoint are ignored. Note that if you already have the full connection string, you most likely do not need AzureCosmosR and can call mongolite::mongo directly.
endpoint: For cosmos_mongo_connection, a MongoDB endpoint object as obtained from cosmos_mongo_endpoint.
...: Optional arguments passed to lower-level functions.
collection, database: For cosmos_mongo_connection, the collection and database to connect to.
Returns
For cosmos_mongo_endpoint, an object of S3 class cosmos_mongo_endpoint.
For cosmos_mongo_connection, an object of class mongolite::mongo which can then be used to interact with the given collection.
Details
These functions act as a bridge between the Azure resource and the functionality provided by the mongolite package.
Examples
## Not run:mendp <- cosmos_mongo_endpoint("https://mymongoacct.mongo.cosmos.azure.com:443", key="mykey")cosmos_mongo_connection(mendp,"mycollection","mydatabase")## End(Not run)
See Also
az_cosmosdb , mongolite::mongo
For the SQL API client framework: cosmos_endpoint , cosmos_database , cosmos_container , query_documents