Azure CLI reference commands for Azure Cosmos DB
The Azure Command-Line Interface (CLI) is a set of commands used to create and manage Azure resources. It's available across many Azure services, including Azure Cosmos DB, and gives you the ability to manage Cosmos DB services from a command-line.
The Azure CLI commands for Azure Cosmos DB are composed of two parts: core and extension. Core Azure CLI commands ship as part of the CLI and are fully supported. An extension gives you access to experimental and pre-release commands. For more information about extension references, see Use extensions with Azure CLI.
Note
You're prompted to install an extension reference on first use. Or, you can use the az extension add command to manually install an extension by name.
See az cosmosdb for an alphabetic list of Azure CLI core and extension references available for the Azure Cosmos DB service. For references in each subgroup, see the tables in the following sections:
- SQL API
- API for MongoDB
- Cassandra API
- Managed Instance for Apache Cassandra
- Gremlin API
- Table API
- Additional Cosmos DB references
SQL API references
| Reference | Description | More information | Core or extension |
|---|---|---|---|
| az cosmosdb sql | Manage the SQL resources of an Azure Cosmos DB account. | Manage Azure Cosmos Core SQL API resources using Azure CLI | Core |
| az cosmosdb sql container | Manage Azure Cosmos DB SQL containers. | Azure Cosmos DB container | Core |
| az cosmosdb sql database | Manage Azure Cosmos DB SQL databases. | Azure Cosmos DB database | Core |
| az cosmosdb sql restorable-container | Manage different versions of SQL containers that can be restored in a database of an Azure Cosmos DB account. | Extension: cosmosdb-preview | |
| az cosmosdb sql restorable-database | Manage different versions of SQL databases that can be restored in a database of an Azure Cosmos DB account. | Extension: cosmosdb-preview | |
| az cosmosdb sql restorable-resource | Manage the databases and its containers that can be restored in an Azure Cosmos DB account for the given timestamp and region. | Extension: cosmosdb-preview | |
| az cosmosdb sql role | Manage Azure Cosmos DB role resources. | Configure role-based access control for your Azure Cosmos DB account | Extension: cosmosdb-preview |
| az cosmosdb sql stored-procedure | Manage Azure Cosmos DB SQL stored procedures. | How to write stored procedures | Core |
| az cosmosdb sql trigger | Manage Azure Cosmos DB SQL triggers. | How to write triggers | Core |
| az cosmosdb sql user-defined-function | Manage Azure Cosmos DB SQL user-defined functions. | How to write user-defined functions | Core |
API for MongoDB references
| Reference | Description | More information | Core or extension |
|---|---|---|---|
| az cosmosdb mongodb | Manage the MongoDB resources of an Azure Cosmos DB account. | Introduction to API for MongoDB | Core |
| az cosmosdb mongodb collection | Manage Azure Cosmos DB MongoDB collections. | Create a database and collection for MongoDB using Azure CLI | Core |
| az cosmosdb mongodb database | Manage Azure Cosmos DB MongoDB databases. | Create a database and collection for MongoDB DB using Azure CLI | Core |
| az cosmosdb mongodb restorable-collection | Manage different versions of MongoDB collections that are restorable in a database of an Azure Cosmos DB account. | Extension: cosmosdb-preview | |
| az cosmosdb mongodb restorable-database | Manage different versions of MongoDB databases that are restorable in an Azure Cosmos DB account. | Extension: cosmosdb-preview | |
| az cosmosdb mongodb restorable-resource | Manage the databases and its collections that are restorable in an Azure Cosmos DB account for the given timestamp and region. | Extension: cosmosdb-preview |
Cassandra API references
| Reference | Description | More information | Core or extension |
|---|---|---|---|
| az cosmosdb cassandra | Manage the Cassandra resources of an Azure Cosmos DB account. | Introduction to Cassandra API in Azure Cosmos DB | Core |
| az cosmosdb cassandra keyspace | Manage Azure Cosmos DB Cassandra keyspaces. | Create a keyspace and table | Core |
| az cosmosdb cassandra table | Manage Azure Cosmos DB Cassandra tables. | Create a keyspace and table | Core |
Managed Instance for Apache Cassandra references
| Reference | Description | More information | Core or extension |
|---|---|---|---|
| az managed-cassandra | References for Managed Instance for Apache Cassandra. | What is Azure-managed instance for Apache Cassandra? | Extension: cosmosdb-preview |
| az managed-cassandra cluster | Reference to handle Managed Instance for Apache Cassandra clusters. | Manage Apache Cassandra resources using Azure CLI | Extension: cosmosdb-preview |
| az managed-cassandra datacenter | Reference to handle Managed Instance for Apache Cassandra datacenters. | Manage Apache Cassandra resources using Azure CLI | Extension: cosmosdb-preview |
Gremlin API references
| Reference | Description | More information | Core or extension |
|---|---|---|---|
| az cosmosdb gremlin | Manage the Gremlin resources of an Azure Cosmos DB account. | Introduction to Gremlin API in Azure Cosmos DB | Core |
| az cosmosdb gremlin database | Manage Azure Cosmos DB Gremlin databases. | Create an Azure Cosmos Gremlin API account, database, and graph using Azure CLI | Core |
| az cosmosdb gremlin graph | Manage Azure Cosmos DB Gremlin graphs. | Create an Azure Cosmos Gremlin API account, database, and graph using Azure CLI | Core |
Table API references
| Reference | Description | More information | Core or extension |
|---|---|---|---|
| az cosmosdb table | Manage the Table resources of an Azure Cosmos DB account. | Introduction to Table API in Azure Cosmos DB | core |
| az cosmosdb table throughput | Manage the throughput Table resources of an Azure Cosmos DB account. | Request units in Azure Cosmos DB | Core |
Additional Cosmos DB references
| Reference | Description | More information | Core or extension |
|---|---|---|---|
| az cosmosdb identity | Manage Azure Cosmos DB-managed service identities. | Use system-assigned managed identities to access Azure Cosmos DB data | Core |
| az cosmosdb keys | Manage Azure Cosmos DB keys. | Secure access to data in Azure Cosmos DB | Core |
| az cosmosdb network-rule | Manage Azure Cosmos DB network rules. | Configure access to Azure Cosmos DB from virtual networks | Core |
| az cosmosdb private-endpoint-connection | Manage Azure Cosmos DB private endpoint connections. | Configure Azure Private Link for an Azure Cosmos account | Core |
| az cosmosdb private-link-resource | Manage Azure Cosmos DB private link resources. | Configure Azure Private Link for an Azure Cosmos account | Core |
| az cosmosdb restorable-database-account | Manage restorable Azure Cosmos DB accounts. | Extension: cosmosdb-preview |
See also
- Get started with Azure CLI to learn about installation and sign in.
- Discover additional reference commands and available extensions in the Azure CLI documentation.
- Learn to use Bash with the Azure CLI
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ