Templat Azure Quickstart saat ini tersedia dalam bahasa Inggris
This template creates an Azure Cosmos DB account for MongoDB API (3.2, 3.6 or 4.0) in two regions using shared autoscale database throughput with two collections.
Templat Azure Resource Manager ini dibuat oleh anggota komunitas dan bukan oleh Microsoft. Setiap templat Resource Manager dilisensikan kepada Anda berdasarkan perjanjian lisensi oleh pemiliknya, bukan Microsoft. Microsoft tidak bertanggung jawab atas templat Resource Manager yang disediakan dan dilisensikan oleh anggota komunitas dan tidak menyaring keamanan, kompatibilitas, atau performa. Templat Community Resource Manager tidak didukung di bawah program atau layanan dukungan Microsoft apa pun, dan tersedia SEBAGAIMANA ADANYA tanpa jaminan apa pun.
Parameter
Nama Parameter | Deskripsi |
---|---|
accountName | Cosmos DB account name |
location | Location for the Cosmos DB account. |
primaryRegion | The primary replica region for the Cosmos DB account. |
secondaryRegion | The secondary replica region for the Cosmos DB account. |
serverVersion | Specifies the MongoDB server version to use. |
defaultConsistencyLevel | The default consistency level of the Cosmos DB account. |
maxStalenessPrefix | Max stale requests. Required for BoundedStaleness. Valid ranges, Single Region: 10 to 1000000. Multi Region: 100000 to 1000000. |
maxIntervalInSeconds | Max lag time (seconds). Required for BoundedStaleness. Valid ranges, Single Region: 5 to 84600. Multi Region: 300 to 86400. |
databaseName | The name for the Mongo DB database |
collection1Name | The name for the first Mongo DB collection |
collection2Name | The name for the second Mongo DB collection |
autoscaleMaxThroughput | Maximum throughput when using Autoscale Throughput Policy for the Database |
Menggunakan templat
Windows PowerShell
New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deploymentMenginstal dan mengonfigurasi Azure PowerShell
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.documentdb/cosmosdb-mongodb-autoscale/azuredeploy.json
Baris perintah
az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deploymentMenginstal dan Mengonfigurasi Azure Cross-Platform Command-Line Interface
az group deployment create --resource-group <my-resource-group> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.documentdb/cosmosdb-mongodb-autoscale/azuredeploy.json