Поделиться через


OperationalInsightsExtensions.FailoverWorkspace Method

Definition

Activates failover for the specified workspace.

The specified replication location must match the location of the enabled replication for this workspace. The failover operation is asynchronous and can take up to 30 minutes to complete. The status of the operation can be checked using the operationId returned in the response.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/locations/{location}/workspaces/{workspaceName}/failover
  • Operation Id: Workspaces_Failover
  • Default Api Version: 2025-02-01
  • Resource: OperationalInsightsWorkspaceResource
public static Azure.ResourceManager.ArmOperation FailoverWorkspace(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.WaitUntil waitUntil, Azure.Core.AzureLocation location, string workspaceName, System.Threading.CancellationToken cancellationToken = default);
static member FailoverWorkspace : Azure.ResourceManager.Resources.ResourceGroupResource * Azure.WaitUntil * Azure.Core.AzureLocation * string * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation
<Extension()>
Public Function FailoverWorkspace (resourceGroupResource As ResourceGroupResource, waitUntil As WaitUntil, location As AzureLocation, workspaceName As String, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

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.

location
AzureLocation

The name of the Azure region.

workspaceName
String

The name of the workspace.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

workspaceName is an empty string, and was expected to be non-empty.

resourceGroupResource or workspaceName is null.

Applies to