get_cosmos_database {AzureCosmosR}R Documentation

Methods for working with Azure Cosmos DB databases

Description

Methods for working with Azure Cosmos DB databases

Usage

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.

Details

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

Value

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

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)

[Package AzureCosmosR version 1.0.0 Index]