Skip to content

Commit b923be0

Browse files
authored
Merge pull request #89144 from SnehaGunda/master
Adding CLI example for availability zones
2 parents 22ef3a1 + 370b0aa commit b923be0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

articles/cosmos-db/high-availability.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The following table summarizes the high availability capability of various accou
102102
> To enable Availability Zone support for a multi region Azure Cosmos account, the account must have multi-master writes enabled.
103103
104104

105-
You can enable zone redundancy when adding a region to new or existing Azure Cosmos accounts. Currently, you can only enable zone redundancy by using Azure portal, PowerShell and Azure Resource Manager templates. To enable zone redundancy on your Azure Cosmos account, you should set the `isZoneRedundant` flag to `true` for a specific location. You can set this flag within the locations property. For example, the following powershell snippet enables zone redundancy for the "Southeast Asia" region:
105+
You can enable zone redundancy when adding a region to new or existing Azure Cosmos accounts. To enable zone redundancy on your Azure Cosmos account, you should set the `isZoneRedundant` flag to `true` for a specific location. You can set this flag within the locations property. For example, the following powershell snippet enables zone redundancy for the "Southeast Asia" region:
106106

107107
```powershell
108108
$locations = @(
@@ -111,6 +111,19 @@ $locations = @(
111111
)
112112
```
113113

114+
The following command shows how to enable zone redundancy for the "EastUS" and "WestUS2" regions:
115+
116+
```azurecli-interactive
117+
az cosmosdb create \
118+
--name mycosmosdbaccount \
119+
--resource-group myResourceGroup \
120+
--kind GlobalDocumentDB \
121+
--default-consistency-level Session \
122+
--locations regionName=EastUS failoverPriority=0 isZoneRedundant=True \
123+
--locations regionName=WestUS2 failoverPriority=1 isZoneRedundant=True \
124+
--enable-multiple-write-locations
125+
```
126+
114127
You can enable Availability Zones by using Azure portal when creating an Azure Cosmos account. When you create an account, make sure to enable the **Geo-redundancy**, **Multi-region Writes**, and choose a region where Availability Zones are supported:
115128

116129
![Enable Availability Zones using Azure portal](./media/high-availability/enable-availability-zones-using-portal.png)

0 commit comments

Comments
 (0)