Delen via


CosmosDBAccountResource.FailoverPriorityChangeAsync Method

Definition

Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange
  • Operation Id: DatabaseAccounts_FailoverPriorityChange
  • Default Api Version: 2024-09-01-preview
  • Resource: CosmosDBAccountResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> FailoverPriorityChangeAsync (Azure.WaitUntil waitUntil, Azure.ResourceManager.CosmosDB.Models.CosmosDBFailoverPolicies failoverParameters, System.Threading.CancellationToken cancellationToken = default);
abstract member FailoverPriorityChangeAsync : Azure.WaitUntil * Azure.ResourceManager.CosmosDB.Models.CosmosDBFailoverPolicies * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation>
override this.FailoverPriorityChangeAsync : Azure.WaitUntil * Azure.ResourceManager.CosmosDB.Models.CosmosDBFailoverPolicies * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation>
Public Overridable Function FailoverPriorityChangeAsync (waitUntil As WaitUntil, failoverParameters As CosmosDBFailoverPolicies, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

failoverParameters
CosmosDBFailoverPolicies

The new failover policies for the database account.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

failoverParameters is null.

Applies to