cosmos_database function

Methods for working with Azure Cosmos DB databases

Methods for working with Azure Cosmos DB databases

get_cosmos_database(object, ...) ## S3 method for class 'cosmos_endpoint' get_cosmos_database(object, database, ...) create_cosmos_database(object, ...) ## S3 method for class 'cosmos_endpoint' create_cosmos_database( object, database, autoscale_maxRUs = NULL, manual_RUs = NULL, headers = list(), ... ) delete_cosmos_database(object, ...) ## S3 method for class 'cosmos_endpoint' delete_cosmos_database(object, database, confirm = TRUE, ...) ## S3 method for class 'cosmos_database' delete_cosmos_database(object, ...) list_cosmos_databases(object, ...) ## S3 method for class 'cosmos_endpoint' list_cosmos_databases(object, ...)

Arguments

  • object: A Cosmos DB endpoint object as obtained from cosmos_endpoint, or for delete_cosmos_database.cosmos_database, the database object.
  • database: The name of the Cosmos DB database.
  • autoscale_maxRUs, manual_RUs: For create_cosmos_database, optional parameters for the maximum request units (RUs) allowed. See the Cosmos DB documentation for more details.
  • headers, ...: Optional arguments passed to lower-level functions.
  • confirm: For delete_cosmos_database, whether to ask for confirmation before deleting.

Returns

get_cosmos_database and create_cosmos_database return an object of class cosmos_database. list_cosmos_databases returns a list of such objects.

Details

These are methods for managing Cosmos DB databases using the core (SQL) API.

Examples

## Not run: endp <- cosmos_endpoint("https://myaccount.documents.azure.com:443/", key="mykey") create_cosmos_database(endp, "mydatabase") list_cosmos_databases(endp) db <- get_cosmos_database(endp, "mydatabase") delete_cosmos_database(db) ## End(Not run)
  • Maintainer: Hong Ooi
  • License: MIT + file LICENSE
  • Last published: 2021-01-18