# S3 method for cosmos_mongo_endpoint
cosmos_mongo_connection(endpoint, collection, database, ...)
Arguments
host
For cosmos_mongo_endpoint, the URL of the Cosmos DB MongoDB endpoint. Usually of the form "https://account-name.mongo.cosmos.azure.com:443/".
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.
Value
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.