共用方式為


LogAnalyticsQueryCollection.CreateOrUpdateAsync 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 System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.OperationalInsights.LogAnalyticsQueryResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, id As String, data As LogAnalyticsQueryData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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