Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 3.19 KB

cli-samples.md

File metadata and controls

36 lines (32 loc) · 3.19 KB
title description author ms.service ms.topic ms.date ms.author
Azure CLI Samples for Azure Cosmos DB
Azure CLI Samples - Create and manage Azure Cosmos DB accounts, databases, containers, regions, and firewalls.
markjbrown
cosmos-db
sample
10/26/2018
mjbrown

Azure CLI samples for Azure Cosmos DB

The following table includes links to sample Azure CLI scripts for Azure Cosmos DB. Reference pages for all Azure Cosmos DB CLI commands are available in the Azure CLI Reference.

Create Azure Cosmos DB account, database, and containers
Create a SQL API account Creates a single Azure Cosmos DB SQL API account, database, and container.
Create a MongoDB API account Creates a single Azure Cosmos DB MongoDB API account, database, and collection.
Create a Gremlin API account Creates a single Azure Cosmos DB Gremlin API account, database, and graph.
Create a Cassandra API account Creates a single Azure Cosmos DB Cassandra API account and database.
Create a Table API account Creates a single Azure Cosmos DB Table API account, database, and table.
Scale Azure Cosmos DB
Scale container throughput Changes the provisioned throughput on a container.
Replicate Azure Cosmos DB database account in multiple regions and configure failover priorities Globally replicates account data into multiple regions with a specified failover priority.
Secure Azure Cosmos DB
Get account keys  Gets the primary and secondary master write keys and primary and secondary read-only keys for the account.
Get MongoDB connection string Gets the connection string to connect your MongoDB app to your Azure Cosmos DB account.
Regenerate account keys Regenerate the keys for the account.
Create a firewall Create an inbound IP access control policy to limit access to the account from an approved set of machines and/or cloud services.
High availability, disaster recovery, backup and restore
Configure failover policy Sets the failover priority of each region in which the account is replicated.
Connect Azure Cosmos DB to resources
Connect a web app to Azure Cosmos DB Create and connect an Azure Cosmos DB database and an Azure web app.