Muokkaa

Jaa


Azure CLI samples for Azure Cosmos DB for Apache Cassandra

APPLIES TO: Cassandra

The following tables include links to sample Azure CLI scripts for the Azure Cosmos DB for Apache Cassandra and to sample Azure CLI scripts that apply to all Azure Cosmos DB APIs. Common samples are the same across all APIs.

These samples require Azure CLI version 2.12.1 or later. Run az --version to find the version. If you need to install or upgrade, see Install Azure CLI. If using Azure Cloud Shell, the latest version is already installed.

API for Cassandra Samples

Task Description
Create an Azure Cosmos DB account, keyspace and table Creates an Azure Cosmos DB account, keyspace, and table for API for Cassandra.
Create a serverless Azure Cosmos DB account for API for Cassandra, keyspace and table Creates a serverless Azure Cosmos DB account, keyspace, and table for API for Cassandra.
Create an Azure Cosmos DB account, keyspace and table with autoscale Creates an Azure Cosmos DB account, keyspace, and table with autoscale for API for Cassandra.
Perform throughput operations Read, update and migrate between autoscale and standard throughput on a keyspace and table.
Lock resources from deletion Prevent resources from being deleted with resource locks.

Common API Samples

These samples apply to all Azure Cosmos DB APIs. These samples use a API for NoSQL account, but these operations are identical across all database APIs in Azure Cosmos DB.

Task Description
Add or fail over regions Add a region, change failover priority, trigger a manual failover.
Perform account key operations  List account keys, read-only keys, regenerate keys and list connection strings.
Secure with IP firewall Create an Azure Cosmos DB account with IP firewall configured.
Secure new account with service endpoints Create an Azure Cosmos DB account and secure with service-endpoints.
Secure existing account with service endpoints Update an Azure Cosmos DB account to secure with service-endpoints when the subnet is eventually configured.
Find existing free-tier account Find whether there is an existing free-tier account in your subscription.

Next steps

Reference pages for all Azure Cosmos DB CLI commands are available in the Azure CLI Reference.

For Azure CLI samples for other APIs see: