-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding parameter enableMultipleWriteLocations in Cosmos DB (#4041)
* adding parameter enableMultipleWriteLocations when creating account to support multi-master * Added required regionParameterForOnline to two examples
- Loading branch information
Showing
4 changed files
with
128 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
...r/Microsoft.DocumentDB/stable/2015-04-08/examples/CosmosDBDatabaseAccountCreateMulti.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"parameters": { | ||
"accountName": "ddb1", | ||
"resourceGroupName": "rg1", | ||
"api-version": "2015-04-08", | ||
"subscriptionId": "subid", | ||
"createUpdateParameters": { | ||
"location": "westus", | ||
"tags": {}, | ||
"kind": "GlobalDocumentDB", | ||
"properties": { | ||
"databaseAccountOfferType": "Standard", | ||
"ipRangeFilter": "10.10.10.10", | ||
"isVirtualNetworkFilterEnabled": true, | ||
"enableMultipleWriteLocations": true, | ||
"virtualNetworkRules": [ | ||
{ | ||
"id": "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" | ||
} | ||
], | ||
"locations": [ | ||
{ | ||
"failoverPriority": 0, | ||
"locationName": "southcentralus" | ||
}, | ||
{ | ||
"failoverPriority": 1, | ||
"locationName": "eastus" | ||
} | ||
], | ||
"consistencyPolicy": { | ||
"defaultConsistencyLevel": "BoundedStaleness", | ||
"maxIntervalInSeconds": 10, | ||
"maxStalenessPrefix": 200 | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1", | ||
"name": "ddb1", | ||
"location": "West US", | ||
"type": "Microsoft.DocumentDB/databaseAccounts", | ||
"kind": "GlobalDocumentDB", | ||
"tags": {}, | ||
"properties": { | ||
"provisioningState": "Initializing", | ||
"ipRangeFilter": "10.10.10.10", | ||
"isVirtualNetworkFilterEnabled": true, | ||
"enableMultipleWriteLocations": true, | ||
"databaseAccountOfferType": "Standard", | ||
"consistencyPolicy": { | ||
"defaultConsistencyLevel": "BoundedStaleness", | ||
"maxIntervalInSeconds": 10, | ||
"maxStalenessPrefix": 200 | ||
}, | ||
"writeLocations": [ | ||
{ | ||
"id": "ddb1-southcentralus", | ||
"locationName": "South Central US", | ||
"provisioningState": "Initializing", | ||
"failoverPriority": 0 | ||
}, | ||
{ | ||
"id": "ddb1-eastus", | ||
"locationName": "East US", | ||
"provisioningState": "Initializing", | ||
"failoverPriority": 1 | ||
} | ||
], | ||
"readLocations": [ | ||
{ | ||
"id": "ddb1-southcentralus", | ||
"locationName": "South Central US", | ||
"provisioningState": "Initializing", | ||
"failoverPriority": 0 | ||
}, | ||
{ | ||
"id": "ddb1-eastus", | ||
"locationName": "East US", | ||
"provisioningState": "Initializing", | ||
"failoverPriority": 1 | ||
} | ||
], | ||
"failoverPolicies": [ | ||
{ | ||
"id": "ddb1-southcentralus", | ||
"locationName": "South Central US", | ||
"failoverPriority": 0 | ||
}, | ||
{ | ||
"id": "ddb1-eastus", | ||
"locationName": "East US", | ||
"failoverPriority": 1 | ||
} | ||
], | ||
"virtualNetworkRules": [ | ||
{ | ||
"id": "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters