forked from Azure/azure-quickstart-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Azure#4539 from WilliamAntonRohm/W-cosmos-arm-temp…
…late Cosmos DB combined ARM template (was Azure#4489)
- Loading branch information
Showing
4 changed files
with
95 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Create an Azure Cosmos DB account for an API type | ||
|
||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-cosmosdb-create-arm-template%2Fazuredeploy.json" target="_blank"> | ||
<img src="http://azuredeploy.net/deploybutton.png"/> | ||
</a> | ||
|
||
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-cosmosdb-create-arm-template%2Fazuredeploy.json" target="_blank"> | ||
<img src="http://armviz.io/visualizebutton.png"/> | ||
</a> | ||
|
||
This template creates an Azure Cosmos DB API account with the provided API type and a generated database account name, and the offer type set to `Standard`. The API type can be one of `Cassandra`, `Gremlin`, `MongoDB`, `SQL`, or `Table`, for example: | ||
|
||
```json | ||
"apiType": { | ||
"value": "Cassandra" | ||
}, | ||
``` | ||
|
||
By not setting the optional consistency level parameter `consistencyLevel`, the account will be created with the default consistency level of `Session`. To set the consistency level to another value, see [101-create-documentdb-account-consistencypolicy](https://github.com/Azure/azure-quickstart-templates/tree/master/101-documentdb-account-consistencypolicy-create). |
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,60 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"apiType": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The Azure Cosmos DB API type, by default Cassandra; otherwise one of Gremlin, MongoDB, SQL, or Table" | ||
}, | ||
"allowedValues": [ | ||
"Cassandra", | ||
"Gremlin", | ||
"MongoDB", | ||
"SQL", | ||
"Table" | ||
], | ||
"defaultValue": "Cassandra" | ||
}, | ||
"databaseAccountName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "The Azure Cosmos DB account name." | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"offerType": "Standard" | ||
}, | ||
"resources": [ | ||
{ | ||
"apiVersion": "2015-04-08", | ||
"type": "Microsoft.DocumentDB/databaseAccounts", | ||
"kind": "[if(equals(parameters('apiType'), 'MongoDB'), 'MongoDB', 'GlobalDocumentDB')]", | ||
"name": "[parameters('databaseAccountName')]", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"name": "[parameters('databaseAccountName')]", | ||
"databaseAccountOfferType": "[variables('offerType')]", | ||
"locations": [ | ||
{ | ||
"locationName": "[resourceGroup().location]", | ||
"failoverPriority": 0 | ||
}, | ||
{ | ||
"locationName": "[resourceGroup().location]", | ||
"failoverPriority": 1 | ||
} | ||
], | ||
"capabilities": [ | ||
{ | ||
"name": "[if(equals(parameters('apiType'), 'Cassandra'), 'EnableCassandra', if(equals(parameters('apiType'), 'Gremlin'), 'EnableGremlin', if(equals(parameters('apiType'), 'MongoDB'), '', if(equals(parameters('apiType'), 'SQL'), '', if(equals(parameters('apiType'), 'Table'), 'EnableTable', '')))))]" | ||
} | ||
] | ||
}, | ||
"tags": { | ||
"defaultExperience": "[if(equals(parameters('apiType'), 'Cassandra'), 'Cassandra', if(equals(parameters('apiType'), 'Gremlin'), 'Graph', if(equals(parameters('apiType'), 'MongoDB'), 'MongoDB', if(equals(parameters('apiType'), 'SQL'), 'DocumentDB', if(equals(parameters('apiType'), 'Table'), 'Table', '')))))]" | ||
} | ||
} | ||
] | ||
} |
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,9 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"databaseAccountName": { | ||
"value": "GEN-UNIQUE" | ||
} | ||
} | ||
} |
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,7 @@ | ||
{ | ||
"itemDisplayName": "Create an Azure Cosmos DB API account", | ||
"description": "This template creates an Azure Cosmos DB API account with the provided API type and the offer type set to 'Standard'. The API type can be one of 'Cassandra', 'Gremlin', 'MongoDB', 'SQL', or 'Table'", | ||
"summary": "Create an Azure Cosmos DB API account (Cassandra, Gremlin, MongoDB, SQL or Table)", | ||
"githubUsername": "dmakwana", | ||
"dateUpdated": "2018-04-12" | ||
} |