Partager via


LogAnalyticsQueryCollection.CreateOrUpdateAsync Méthode

Définition

Ajoute ou Mises à jour une requête spécifique dans un QueryPack Log Analytics.

  • Chemin/abonnements de la demande/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/query/{id}
  • IdQueries_Put d’opération
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))

Paramètres

waitUntil
WaitUntil

Completed si la méthode doit attendre la fin de l’opération de longue durée sur le service ; Started s’il doit retourner après le démarrage de l’opération. Pour plus d’informations sur les opérations de longue durée, consultez Exemples d’opérations Azure.Core Long-Running.

id
String

ID d’une requête spécifique définie dans log Analytics QueryPack.

data
LogAnalyticsQueryData

Propriétés qui doivent être spécifiées pour créer une requête et l’ajouter à un QueryPack Log Analytics.

cancellationToken
CancellationToken

Jeton d’annulation à utiliser.

Retours

Exceptions

id est une chaîne vide, et on s’attendait à ce qu’elle ne soit pas vide.

id ou data est null.

S’applique à