Udostępnij za pośrednictwem


LogAnalyticsQueryCollection.CreateOrUpdate Method

Definition

Adds or Updates a specific Query within a Log Analytics QueryPack.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries/{id}
  • Operation Id: Queries_Put
  • Default Api Version: 2019-09-01
  • Resource: LogAnalyticsQueryResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, id As String, data As LogAnalyticsQueryData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of LogAnalyticsQueryResource)

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.

id
String

The id of a specific query defined in the Log Analytics QueryPack.

data
LogAnalyticsQueryData

Properties that need to be specified to create a new query and add it to a Log Analytics QueryPack.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

id or data is null.

Applies to