|
1 | 1 | ---
|
2 |
| -title: Create a Gremlin serverless account, database and graph for Azure Cosmos DB |
3 |
| -description: Create a Gremlin serverless account, database and graph for Azure Cosmos DB |
| 2 | +title: Azure Cosmos DB Gremlin serverless account, database, and graph |
| 3 | +description: Use this Azure CLI script to create an Azure Cosmos DB Gremlin serverless account, database, and graph. |
4 | 4 | author: markjbrown
|
5 | 5 | ms.author: mjbrown
|
6 | 6 | ms.service: cosmos-db
|
7 | 7 | ms.subservice: cosmosdb-graph
|
8 | 8 | ms.topic: sample
|
9 |
| -ms.date: 02/21/2022 |
| 9 | +ms.date: 05/02/2022 |
| 10 | +ms.custom: kr2b-contr-experiment |
10 | 11 | ---
|
11 | 12 |
|
12 |
| -# Create an Azure Cosmos Gremlin API serverless account, database and graph using Azure CLI |
| 13 | +# Use Azure CLI to create a Gremlin serverless account, database, and graph |
13 | 14 |
|
14 |
| -[!INCLUDE[appliesto-gremlin-api](../../../includes/appliesto-gremlin-api.md)] |
| 15 | +[!INCLUDE [appliesto-gremlin-api](../../../includes/appliesto-gremlin-api.md)] |
15 | 16 |
|
16 |
| -The script in this article demonstrates creating a Gremlin serverless account, database and graph. |
| 17 | +The script in this article creates an Azure Cosmos DB Gremlin API serverless account, database, and graph. |
17 | 18 |
|
18 |
| -[!INCLUDE [quickstarts-free-trial-note](../../../../../includes/quickstarts-free-trial-note.md)] |
| 19 | +## Prerequisites |
19 | 20 |
|
20 |
| -[!INCLUDE [azure-cli-prepare-your-environment.md](../../../../../includes/azure-cli-prepare-your-environment.md)] |
| 21 | +- [!INCLUDE [quickstarts-free-trial-note](../../../../../includes/quickstarts-free-trial-note.md)] |
21 | 22 |
|
22 |
| -- This article requires version 2.30 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli). If using Azure Cloud Shell, the latest version is already installed. |
| 23 | +- This script requires Azure CLI version 2.30 or later. |
| 24 | + |
| 25 | + - You can run the script in the Bash environment in [Azure Cloud Shell](/azure/cloud-shell/quickstart). When Cloud Shell opens, make sure to select **Bash** in the environment field at the upper left of the shell window. Cloud Shell has the latest version of Azure CLI. |
| 26 | + |
| 27 | + [](https://shell.azure.com) |
| 28 | + |
| 29 | + - If you prefer, you can [install Azure CLI](/cli/azure/install-azure-cli) to run the script locally. Run [az version](/cli/azure/reference-index?#az-version) to find your Azure CLI version, and run [az upgrade](/cli/azure/reference-index?#az-upgrade) if you need to upgrade. Sign in to Azure by running [az login](/cli/azure/reference-index#az-login). |
23 | 30 |
|
24 | 31 | ## Sample script
|
25 | 32 |
|
26 |
| -[!INCLUDE [cli-launch-cloud-shell-sign-in.md](../../../../../includes/cli-launch-cloud-shell-sign-in.md)] |
| 33 | +This script uses the following commands: |
27 | 34 |
|
28 |
| -### Run the script |
| 35 | +- [az group create](/cli/azure/group#az-group-create) creates a resource group to store all resources. |
| 36 | +- [az cosmosdb create](/cli/azure/cosmosdb#az-cosmosdb-create) with the `--capabilities EnableGremlin EnableServerless` parameter creates a Gremlin-enabled, serverless Azure Cosmos DB account. |
| 37 | +- [az cosmosdb gremlin database create](/cli/azure/cosmosdb/gremlin/database#az-cosmosdb-gremlin-database-create) creates an Azure Cosmos DB Gremlin database. |
| 38 | +- [az cosmosdb gremlin graph create](/cli/azure/cosmosdb/gremlin/graph#az-cosmosdb-gremlin-graph-create) creates an Azure Cosmos DB Gremlin graph. |
29 | 39 |
|
30 | 40 | :::code language="azurecli" source="~/azure_cli_scripts/cosmosdb/gremlin/serverless.sh" id="FullScript":::
|
31 | 41 |
|
32 |
| -## Clean up resources |
| 42 | +## Delete resources |
33 | 43 |
|
34 |
| -[!INCLUDE [cli-clean-up-resources.md](../../../../../includes/cli-clean-up-resources.md)] |
| 44 | +If you don't need the resources the script created, use the [az group delete](/cli/azure/group#az-group-delete) command to delete the resource group and all resources it contains, including the Azure Cosmos DB account and database. |
35 | 45 |
|
36 | 46 | ```azurecli
|
37 | 47 | az group delete --name $resourceGroup
|
38 | 48 | ```
|
39 | 49 |
|
40 |
| -## Sample reference |
41 |
| - |
42 |
| -This script uses the following commands. Each command in the table links to command specific documentation. |
43 |
| - |
44 |
| -| Command | Notes | |
45 |
| -|---|---| |
46 |
| -| [az group create](/cli/azure/group#az-group-create) | Creates a resource group in which all resources are stored. | |
47 |
| -| [az cosmosdb create](/cli/azure/cosmosdb#az-cosmosdb-create) | Creates an Azure Cosmos DB account. | |
48 |
| -| [az cosmosdb gremlin database create](/cli/azure/cosmosdb/gremlin/database#az-cosmosdb-gremlin-database-create) | Creates an Azure Cosmos Gremlin database. | |
49 |
| -| [az cosmosdb gremlin graph create](/cli/azure/cosmosdb/gremlin/graph#az-cosmosdb-gremlin-graph-create) | Creates an Azure Cosmos Gremlin graph. | |
50 |
| -| [az group delete](/cli/azure/resource#az-resource-delete) | Deletes a resource group including all nested resources. | |
51 |
| - |
52 | 50 | ## Next steps
|
53 | 51 |
|
54 |
| -For more information on the Azure Cosmos DB CLI, see [Azure Cosmos DB CLI documentation](/cli/azure/cosmosdb). |
| 52 | +[Azure Cosmos DB CLI documentation](/cli/azure/cosmosdb) |
0 commit comments