MonitorWorkspaceCollection.CreateOrUpdate Method

Definition

Creates or updates an Azure Monitor Workspace

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}.
  • Operation Id. : AzureMonitorWorkspaces_CreateOrUpdate.
  • Default Api Version. : 2025-10-03.
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Monitor.Workspaces.MonitorWorkspaceResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string azureMonitorWorkspaceName, Azure.ResourceManager.Monitor.Workspaces.MonitorWorkspaceData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Monitor.Workspaces.MonitorWorkspaceData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Monitor.Workspaces.MonitorWorkspaceResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Monitor.Workspaces.MonitorWorkspaceData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Monitor.Workspaces.MonitorWorkspaceResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, azureMonitorWorkspaceName As String, data As MonitorWorkspaceData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of MonitorWorkspaceResource)

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.

azureMonitorWorkspaceName
String

The name of the Azure Monitor Workspace. The name is case insensitive.

data
MonitorWorkspaceData

Properties that need to be specified to create a new Azure Monitor Workspace.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

azureMonitorWorkspaceName or data is null.

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

Applies to