Update-AzCosmosDBAccountFailoverPriority
Update Failover Region Priority of a Cosmos DB Account.
Syntax
Update-AzCosmosDBAccountFailoverPriority
-ResourceGroupName <String>
-Name <String>
-FailoverPolicy <String[]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzCosmosDBAccountFailoverPriority
-ResourceId <String>
-FailoverPolicy <String[]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzCosmosDBAccountFailoverPriority
-FailoverPolicy <String[]>
-InputObject <PSDatabaseAccountGetResults>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Update Failover Region Priority of a Cosmos DB Account.
Examples
Example 1
Update-AzCosmosDBAccountFailoverPriority -ResourceGroupName rg -Name dbname -FailoverPolicy "region1", "region2", "region3"
Id : /subscriptions/{subscriptionid}/resourceGroups/rg/providers/Microsoft.DocumentDB/databaseAccounts/dbname
Name : dbname
Location : region1
Tags : {}
EnableCassandraConnector :
EnableMultipleWriteLocations : True
VirtualNetworkRules : {}
FailoverPolicies : {dbname-region1, dbname-region2, dbname-region3}
Locations : {dbname-region1, dbname-region2, dbname-region3}
ReadLocations : {dbname-region1, dbname-region2, dbname-region3}
WriteLocations : {dbname-region1}
Capabilities : {}
ConsistencyPolicy : Microsoft.Azure.Management.CosmosDB.Fluent.Models.ConsistencyPolicy
EnableAutomaticFailover : False
IsVirtualNetworkFilterEnabled : False
IpRules : {}
DatabaseAccountOfferType : Standard
DocumentEndpoint : https://dbname.documents.azure.com:443/
ProvisioningState : Succeeded
Kind : GlobalDocumentDB
FailoverPolicies updated with region1 as FailoverPriority 1, region2 as FailoverPriority 2 and region3 as FailoverPriority 3.
Parameters
-AsJob
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FailoverPolicy
Array of strings having region names, ordered by failover priority. E.g eastus, westus
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Cosmos DB Account object
Type: | PSDatabaseAccountGetResults |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Name of the Cosmos DB database account.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Name of resource group.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
ResourceId of the resource.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None