title | description | ms.service | ms.topic | ms.date | author | ms.author | ms.reviewer | ms.custom |
---|---|---|---|---|---|---|---|---|
Azure PowerShell samples common to all Azure Cosmos DB APIs |
Azure PowerShell Samples common to all Azure Cosmos DB APIs |
cosmos-db |
sample |
05/02/2022 |
seesharprun |
sidandrews |
mjbrown |
devx-track-azurecli |
[!INCLUDEappliesto-all-apis]
The following table includes links to sample Azure PowerShell scripts that apply to all Cosmos DB APIs. For API specific samples, see API specific samples. Common samples are the same across all APIs.
[!INCLUDE updated-for-az]
These samples require Azure PowerShell Az 5.4.0 or later. Run Get-Module -ListAvailable Az
to see which versions are installed. If you need to install, see Install Azure PowerShell module.
These samples use a SQL (Core) API account. To use these samples for other APIs, copy the related properties and apply to your API specific scripts.
Task | Description |
---|---|
Account keys or connection strings | Get primary and secondary keys and connection strings, or regenerate an account key. |
Change failover priority or trigger failover | Change the regional failover priority or trigger a manual failover. |
Create an account with IP Firewall | Create an Azure Cosmos DB account with IP Firewall enabled. |
Update account | Update an account's default consistency level. |
Update an account's regions | Add regions to an account or change regional failover order. |