MonitorSliCollection.CreateOrUpdate Method

Definition

Creates or updates an SLI resource.

  • Request Path. : /providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.Monitor/slis/{sliName}.
  • Operation Id. : Slis_CreateOrUpdate.
  • Default Api Version. : 2025-03-01-preview.
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Monitor.Slis.MonitorSliResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string sliName, Azure.ResourceManager.Monitor.Slis.MonitorSliData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Monitor.Slis.MonitorSliData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Monitor.Slis.MonitorSliResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Monitor.Slis.MonitorSliData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Monitor.Slis.MonitorSliResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, sliName As String, data As MonitorSliData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of MonitorSliResource)

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.

sliName
String

Name of the SLI that is given by the user.

data
MonitorSliData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

sliName or data is null.

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

Applies to