Skip to content

Commit 7e957fe

Browse files
author
Patrick El-Azem
committed
Cosmos DB | Minor edits
1 parent 404ba20 commit 7e957fe

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

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

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Create and manage Azure Cosmos DB using PowerShell
3-
description: Use Azure Powershell manage your Azure Cosmos DB accounts, databases, containers, and throughput.
3+
description: Use Azure Powershell manage your Azure Cosmos accounts, databases, containers, and throughput.
44
author: markjbrown
55
ms.service: cosmos-db
66
ms.topic: sample
@@ -14,7 +14,7 @@ ms.custom: seodec18
1414
The following guide describes how to use PowerShell to script and automate management of Azure Cosmos DB resources, including account, database, container, and throughput.
1515

1616
> [!NOTE]
17-
> Samples in this article use `Get-AzResource`/`Set-AzResource` Powershell cmdlets for Azure resource operations as well as [Az.CosmosDB](https://docs.microsoft.com/powershell/module/az.cosmosdb) management cmdlets. Please note that the `Az.CosmosDB` cmdlets are still in preview and may change before release. Please check for updates to `Az.CosmosDB` regularly.
17+
> Samples in this article use `Get-AzResource` and `Set-AzResource` Powershell cmdlets for Azure resource operations as well as [Az.CosmosDB](https://docs.microsoft.com/powershell/module/az.cosmosdb) management cmdlets. `Az.CosmosDB` cmdlets are still in preview and may change before they are Generally Available. See the [Az.CosmosDB](https://docs.microsoft.com/powershell/module/az.cosmosdb) API reference page for any updates to the commands.
1818
1919
To view all of the properties that can be managed using `Get-Resource`/`Set-AzResource` PowerShell cmdlets, see [Azure Cosmos DB resource provider schema](/azure/templates/microsoft.documentdb/allversions)
2020

@@ -28,23 +28,23 @@ Follow the instructions in [How to install and configure Azure PowerShell][power
2828

2929
* `Set-AzureResource` is used below. It will ask for user confirmation. If you prefer to execute without requiring user confirmation, append the `-Force` flag to the command.
3030

31-
## Azure Cosmos DB Accounts
31+
## Azure Cosmos accounts
3232

33-
The following sections demonstrate how to manage the Azure Cosmos DB account, including:
33+
The following sections demonstrate how to manage the Azure Cosmos account, including:
3434

35-
* [Create an Azure Cosmos DB account](#create-account)
36-
* [Update an Azure Cosmos DB account](#update-account)
37-
* [List all Azure Cosmos DB accounts in a subscription](#list-accounts)
38-
* [Get an Azure Cosmos DB account](#get-account)
39-
* [Delete an Azure Cosmos DB account](#delete-account)
40-
* [Update tags for an Azure Cosmos DB account](#update-tags)
41-
* [List keys for an Azure Cosmos DB account](#list-keys)
42-
* [Regenerate keys for an Azure Cosmos DB account](#regenerate-keys)
43-
* [List connection strings for an Azure Cosmos DB account](#list-connection-strings)
44-
* [Modify failover priority for an Azure Cosmos DB account](#modify-failover-priority)
45-
* [Trigger a manual failover for an Azure Cosmos DB account](#trigger-manual-failover)
35+
* [Create an Azure Cosmos account](#create-account)
36+
* [Update an Azure Cosmos account](#update-account)
37+
* [List all Azure Cosmos accounts in a subscription](#list-accounts)
38+
* [Get an Azure Cosmos account](#get-account)
39+
* [Delete an Azure Cosmos account](#delete-account)
40+
* [Update tags for an Azure Cosmos account](#update-tags)
41+
* [List keys for an Azure Cosmos account](#list-keys)
42+
* [Regenerate keys for an Azure Cosmos account](#regenerate-keys)
43+
* [List connection strings for an Azure Cosmos account](#list-connection-strings)
44+
* [Modify failover priority for an Azure Cosmos account](#modify-failover-priority)
45+
* [Trigger a manual failover for an Azure Cosmos account](#trigger-manual-failover)
4646

47-
### <a id="create-account"></a> Create an Azure Cosmos DB account
47+
### <a id="create-account"></a> Create an Azure Cosmos account
4848

4949
This command creates an Azure Cosmos DB database account with [multiple regions][distribute-data-globally], [automatic failover](how-to-manage-database-account.md#automatic-failover) and bounded-staleness [consistency policy](consistency-levels.md).
5050

@@ -67,25 +67,25 @@ New-AzCosmosDBAccount -ResourceGroupName $resourceGroupName `
6767

6868
* `$resourceGroupName` The Azure resource group into which to deploy the Cosmos account. It must already exist.
6969
* `$locations` The regions for the database account, starting with the write region and ordered by failover priority.
70-
* `$accountName` The name for the Azure Cosmos DB account. Must be unique, lowercase, include only alphanumeric and '-' characters, and between 3 and 31 characters in length.
70+
* `$accountName` The name for the Azure Cosmos account. Must be unique, lowercase, include only alphanumeric and '-' characters, and between 3 and 31 characters in length.
7171
* `$apiKind` The type of Cosmos account to create. For more information, see [APIs in Cosmos DB](introduction.md#develop-applications-on-cosmos-db-using-popular-open-source-software-oss-apis).
72-
* `$consistencyPolicy`, `$maxStalenessInterval`, and `$maxStalenessPrefix` The default consistency level and settings of the Azure Cosmos DB account. For more information, see [Consistency Levels in Azure Cosmos DB](consistency-levels.md).
72+
* `$consistencyPolicy`, `$maxStalenessInterval`, and `$maxStalenessPrefix` The default consistency level and settings of the Azure Cosmos account. For more information, see [Consistency Levels in Azure Cosmos DB](consistency-levels.md).
7373

74-
Azure Cosmos DB accounts can be configured with IP Firewall, Virtual Network service endpoints, and private endpoints. For information on how to configure the IP Firewall for Azure Cosmos DB, see [Configure IP Firewall](how-to-configure-firewall.md). For information on how to enable service endpoints for Azure Cosmos DB, see [Configure access from virtual Networks](how-to-configure-vnet-service-endpoint.md). For information on how to enable private endpoints for Azure Cosmos DB, see [Configure access from private endpoints](how-to-configure-private-endpoints.md).
74+
Azure Cosmos accounts can be configured with IP Firewall, Virtual Network service endpoints, and private endpoints. For information on how to configure the IP Firewall for Azure Cosmos DB, see [Configure IP Firewall](how-to-configure-firewall.md). For information on how to enable service endpoints for Azure Cosmos DB, see [Configure access from virtual Networks](how-to-configure-vnet-service-endpoint.md). For information on how to enable private endpoints for Azure Cosmos DB, see [Configure access from private endpoints](how-to-configure-private-endpoints.md).
7575

76-
### <a id="list-accounts"></a> List all Azure Cosmos DB accounts in a Resource Group
76+
### <a id="list-accounts"></a> List all Azure Cosmos accounts in a Resource Group
7777

78-
This command lists all Azure Cosmos DB accounts in a Resource Group.
78+
This command lists all Azure Cosmos accounts in a Resource Group.
7979

8080
```azurepowershell-interactive
8181
$resourceGroupName = "myResourceGroup"
8282
8383
Get-AzCosmosDBAccount -ResourceGroupName $resourceGroupName
8484
```
8585

86-
### <a id="get-account"></a> Get the properties of an Azure Cosmos DB account
86+
### <a id="get-account"></a> Get the properties of an Azure Cosmos account
8787

88-
This command allows you to get the properties of an existing Azure Cosmos DB account.
88+
This command allows you to get the properties of an existing Azure Cosmos account.
8989

9090
```azurepowershell-interactive
9191
$resourceGroupName = "myResourceGroup"
@@ -94,7 +94,7 @@ $accountName = "mycosmosaccount"
9494
Get-AzCosmosDBAccount -ResourceGroupName $resourceGroupName -Name $accountName
9595
```
9696

97-
### <a id="update-account"></a> Update an Azure Cosmos DB account
97+
### <a id="update-account"></a> Update an Azure Cosmos account
9898

9999
This command allows you to update your Azure Cosmos DB database account properties. Properties that can be updated include the following:
100100

@@ -105,7 +105,7 @@ This command allows you to update your Azure Cosmos DB database account properti
105105
* Enabling Multi-master
106106

107107
> [!NOTE]
108-
> You cannot simultaneously add or remove regions `locations` and change other properties for an Azure Cosmos DB account. Modifying regions must be performed as a separate operation from any other change to the account.
108+
> You cannot simultaneously add or remove regions `locations` and change other properties for an Azure Cosmos account. Modifying regions must be performed as a separate operation from any other change to the account.
109109
> [!NOTE]
110110
> This command allows you to add and remove regions but does not allow you to modify failover priorities or trigger a manual failover. See [Modify failover priority](#modify-failover-priority) and [Trigger manual failover](#trigger-manual-failover).
111111
@@ -169,7 +169,7 @@ Set-AzResource -ResourceType $resourceType `
169169
Write-Host "Set-AzResource returns before the region update is complete."
170170
Write-Host "Check account in Azure portal or using Get-AzCosmosDBAccount for region status."
171171
```
172-
### <a id="multi-master"></a> Enable multiple write regions for an Azure Cosmos DB account
172+
### <a id="multi-master"></a> Enable multiple write regions for an Azure Cosmos account
173173

174174
```azurepowershell-interactive
175175
$resourceGroupName = "myResourceGroup"
@@ -191,9 +191,9 @@ Update-AzCosmosDBAccount `
191191
-EnableMultipleWriteLocations:$enableMultiMaster
192192
```
193193

194-
### <a id="delete-account"></a> Delete an Azure Cosmos DB account
194+
### <a id="delete-account"></a> Delete an Azure Cosmos account
195195

196-
This command deletes an existing Azure Cosmos DB account.
196+
This command deletes an existing Azure Cosmos account.
197197

198198
```azurepowershell-interactive
199199
$resourceGroupName = "myResourceGroup"
@@ -204,9 +204,9 @@ Remove-AzCosmosDBAccount `
204204
-Name $accountName -PassThru
205205
```
206206

207-
### <a id="update-tags"></a> Update Tags of an Azure Cosmos DB account
207+
### <a id="update-tags"></a> Update Tags of an Azure Cosmos account
208208

209-
This command sets the [Azure resource tags][azure-resource-tags] for an Azure Cosmos DB account. Tags can be set both at account creation using `New-AzCosmosDBAccount` as well as on account update using `Update-AzCosmosDBAccount`.
209+
This command sets the [Azure resource tags][azure-resource-tags] for an Azure Cosmos account. Tags can be set both at account creation using `New-AzCosmosDBAccount` as well as on account update using `Update-AzCosmosDBAccount`.
210210

211211
```azurepowershell-interactive
212212
$resourceGroupName = "myResourceGroup"
@@ -220,8 +220,8 @@ Update-AzCosmosDBAccount `
220220

221221
### <a id="list-keys"></a> List Account Keys
222222

223-
When you create an Azure Cosmos DB account, the service generates two master access keys that can be used for authentication when the Azure Cosmos DB account is accessed. Read-only keys for authenticating read-only operations are also generated.
224-
By providing two access keys, Azure Cosmos DB enables you to regenerate and rotate one key at a time with no interruption to your Azure Cosmos DB account.
223+
When you create an Azure Cosmos account, the service generates two master access keys that can be used for authentication when the Azure Cosmos account is accessed. Read-only keys for authenticating read-only operations are also generated.
224+
By providing two access keys, Azure Cosmos DB enables you to regenerate and rotate one key at a time with no interruption to your Azure Cosmos account.
225225
Cosmos DB accounts have two read-write keys (primary and secondary) and two read-only keys (primary and secondary).
226226

227227
```azurepowershell-interactive
@@ -248,8 +248,8 @@ Get-AzCosmosDBAccountKey `
248248

249249
### <a id="regenerate-keys"></a> Regenerate Account Keys
250250

251-
Access keys to an Azure Cosmos DB account should be periodically regenerated to help keep connections secure. A primary and secondary access keys are assigned to the account. This allows clients to maintain access while one key at a time is regenerated.
252-
There are four types of keys for an Azure Cosmos DB account (Primary, Secondary, PrimaryReadonly, and SecondaryReadonly)
251+
Access keys to an Azure Cosmos account should be periodically regenerated to help keep connections secure. A primary and secondary access keys are assigned to the account. This allows clients to maintain access while one key at a time is regenerated.
252+
There are four types of keys for an Azure Cosmos account (Primary, Secondary, PrimaryReadonly, and SecondaryReadonly)
253253

254254
```azurepowershell-interactive
255255
$resourceGroupName = "myResourceGroup" # Resource Group must already exist
@@ -292,7 +292,7 @@ For accounts configured with Automatic Failover, you can change the order in whi
292292
For the example below, assume the current failover priority is `West US 2 = 0`, `East US 2 = 1`, `South Central US = 2`. The command will change this to `West US 2 = 0`, `South Central US = 1`, `East US 2 = 2`.
293293

294294
> [!CAUTION]
295-
> Changing the location for `failoverPriority=0` will trigger a manual failover for an Azure Cosmos DB account. Any other priority changes will not trigger a failover.
295+
> Changing the location for `failoverPriority=0` will trigger a manual failover for an Azure Cosmos account. Any other priority changes will not trigger a failover.
296296
297297
```azurepowershell-interactive
298298
$resourceGroupName = "myResourceGroup"
@@ -312,7 +312,7 @@ For accounts configured with Manual Failover, you can fail over and promote any
312312
For the example below, assume the account has a current failover priority of `West US 2 = 0` and `East US 2 = 1` and flip the regions.
313313

314314
> [!CAUTION]
315-
> Changing `locationName` for `failoverPriority=0` will trigger a manual failover for an Azure Cosmos DB account. Any other priority change will not trigger a failover.
315+
> Changing `locationName` for `failoverPriority=0` will trigger a manual failover for an Azure Cosmos account. Any other priority change will not trigger a failover.
316316
317317
```azurepowershell-interactive
318318
$resourceGroupName = "myResourceGroup"
@@ -642,7 +642,7 @@ Remove-AzCosmosDBSqlContainer `
642642
## Next steps
643643

644644
* [All PowerShell Samples](powershell-samples.md)
645-
* [How to manage Azure Cosmos DB account](how-to-manage-database-account.md)
645+
* [How to manage Azure Cosmos account](how-to-manage-database-account.md)
646646
* [Create an Azure Cosmos DB container](how-to-create-container.md)
647647
* [Configure time-to-live in Azure Cosmos DB](how-to-time-to-live.md)
648648

0 commit comments

Comments
 (0)