Share via


ApplicationInsightsComponentResource.AddOrUpdateAnalyticsItemAsync Method

Definition

Adds or Updates a specific Analytics Item within an Application Insights component.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item
  • Operation Id: AnalyticsItems_Put
  • Default Api Version: 2015-05-01
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem>> AddOrUpdateAnalyticsItemAsync (Azure.ResourceManager.ApplicationInsights.Models.AnalyticsItemScopePath scopePath, Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem itemProperties, bool? overrideItem = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AddOrUpdateAnalyticsItemAsync : Azure.ResourceManager.ApplicationInsights.Models.AnalyticsItemScopePath * Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem>>
override this.AddOrUpdateAnalyticsItemAsync : Azure.ResourceManager.ApplicationInsights.Models.AnalyticsItemScopePath * Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem>>
Public Overridable Function AddOrUpdateAnalyticsItemAsync (scopePath As AnalyticsItemScopePath, itemProperties As ApplicationInsightsComponentAnalyticsItem, Optional overrideItem As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ApplicationInsightsComponentAnalyticsItem))

Parameters

scopePath
AnalyticsItemScopePath

Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component.

itemProperties
ApplicationInsightsComponentAnalyticsItem

Properties that need to be specified to create a new item and add it to an Application Insights component.

overrideItem
Nullable<Boolean>

Flag indicating whether or not to force save an item. This allows overriding an item if it already exists.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

itemProperties is null.

Applies to