Skip to content

Commit 4317fdb

Browse files
authored
Merge pull request #111180 from markjbrown/mjbrown-quick-fix
Remove spaces
2 parents 14600dc + 5385b69 commit 4317fdb

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

articles/cosmos-db/manage-with-cli.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Use Azure CLI to manage your Azure Cosmos DB account, database and
44
author: markjbrown
55
ms.service: cosmos-db
66
ms.topic: conceptual
7-
ms.date: 01/21/2020
7+
ms.date: 04/13/2020
88
ms.author: mjbrown
99

1010
---
@@ -45,24 +45,24 @@ Create an Azure Cosmos account with two regions, add a region, and remove a regi
4545
> This command allows you to add and remove regions but does not allow you to modify failover priorities or trigger a manual failover. See [Set failover priority](#set-failover-priority) and [Trigger manual failover](#trigger-manual-failover).
4646
4747
```azurecli-interactive
48-
resourceGroupName = 'myResourceGroup'
49-
accountName = 'mycosmosaccount' # must be lower case and <31 characters
48+
resourceGroupName='myResourceGroup'
49+
accountName='mycosmosaccount' # must be lower case and <31 characters
5050
5151
# Create an account with 2 regions
5252
az cosmosdb create --name $accountName --resource-group $resourceGroupName \
53-
--locations regionName= "West US 2" failoverPriority=0 isZoneRedundant=False \
54-
--locations regionName= "East US 2" failoverPriority=1 isZoneRedundant=False
53+
--locations regionName="West US 2" failoverPriority=0 isZoneRedundant=False \
54+
--locations regionName="East US 2" failoverPriority=1 isZoneRedundant=False
5555
5656
# Add a region
5757
az cosmosdb update --name $accountName --resource-group $resourceGroupName \
58-
--locations regionName= "West US 2" failoverPriority=0 isZoneRedundant=False \
59-
--locations regionName= "East US 2" failoverPriority=1 isZoneRedundant=False \
60-
--locations regionName= "South Central US" failoverPriority=2 isZoneRedundant=False
58+
--locations regionName="West US 2" failoverPriority=0 isZoneRedundant=False \
59+
--locations regionName="East US 2" failoverPriority=1 isZoneRedundant=False \
60+
--locations regionName="South Central US" failoverPriority=2 isZoneRedundant=False
6161
6262
# Remove a region
6363
az cosmosdb update --name $accountName --resource-group $resourceGroupName \
64-
--locations regionName= "West US 2" failoverPriority=0 isZoneRedundant=False \
65-
--locations regionName= "East US 2" failoverPriority=1 isZoneRedundant=False
64+
--locations regionName="West US 2" failoverPriority=0 isZoneRedundant=False \
65+
--locations regionName="East US 2" failoverPriority=1 isZoneRedundant=False
6666
```
6767

6868
## Enable multiple write regions
@@ -71,8 +71,8 @@ Enable multi-master for a Cosmos account
7171

7272
```azurecli-interactive
7373
# Update an Azure Cosmos account from single to multi-master
74-
resourceGroupName = 'myResourceGroup'
75-
accountName = 'mycosmosaccount'
74+
resourceGroupName='myResourceGroup'
75+
accountName='mycosmosaccount'
7676
7777
# Get the account resource id for an existing account
7878
accountId=$(az cosmosdb show -g $resourceGroupName -n $accountName --query id -o tsv)
@@ -86,8 +86,8 @@ Set the failover priority for an Azure Cosmos account configured for automatic f
8686

8787
```azurecli-interactive
8888
# Assume region order is initially 'West US 2'=0 'East US 2'=1 'South Central US'=2 for account
89-
resourceGroupName = 'myResourceGroup'
90-
accountName = 'mycosmosaccount'
89+
resourceGroupName='myResourceGroup'
90+
accountName='mycosmosaccount'
9191
9292
# Get the account resource id for an existing account
9393
accountId=$(az cosmosdb show -g $resourceGroupName -n $accountName --query id -o tsv)
@@ -101,8 +101,8 @@ az cosmosdb failover-priority-change --ids $accountId \
101101

102102
```azurecli-interactive
103103
# Enable automatic failover on an existing account
104-
resourceGroupName = 'myResourceGroup'
105-
accountName = 'mycosmosaccount'
104+
resourceGroupName='myResourceGroup'
105+
accountName='mycosmosaccount'
106106
107107
# Get the account resource id for an existing account
108108
accountId=$(az cosmosdb show -g $resourceGroupName -n $accountName --query id -o tsv)
@@ -117,8 +117,8 @@ az cosmosdb update --ids $accountId --enable-automatic-failover true
117117
118118
```azurecli-interactive
119119
# Assume region order is initially 'West US 2'=0 'East US 2'=1 'South Central US'=2 for account
120-
resourceGroupName = 'myResourceGroup'
121-
accountName = 'mycosmosaccount'
120+
resourceGroupName='myResourceGroup'
121+
accountName='mycosmosaccount'
122122
123123
# Get the account resource id for an existing account
124124
accountId=$(az cosmosdb show -g $resourceGroupName -n $accountName --query id -o tsv)
@@ -268,17 +268,17 @@ Create a Cosmos container with TTL enabled.
268268

269269
```azurecli-interactive
270270
# Create an Azure Cosmos container with TTL of one day
271-
resourceGroupName = 'myResourceGroup'
272-
accountName = 'mycosmosaccount'
273-
databaseName = 'database1'
274-
containerName = 'container1'
271+
resourceGroupName='myResourceGroup'
272+
accountName='mycosmosaccount'
273+
databaseName='database1'
274+
containerName='container1'
275275
276276
az cosmosdb sql container update \
277277
-g $resourceGroupName \
278278
-a $accountName \
279279
-d $databaseName \
280280
-n $containerName \
281-
--ttl = 86400
281+
--ttl=86400
282282
```
283283

284284
## Create a container with a custom index policy

0 commit comments

Comments
 (0)