Delen via


ApplicationInsightsComponentResource.PutAnalyticsItemAsync 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>> PutAnalyticsItemAsync (Azure.ResourceManager.ApplicationInsights.Models.ItemScopePath scopePath, Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem itemProperties, bool? overrideItem = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PutAnalyticsItemAsync : Azure.ResourceManager.ApplicationInsights.Models.ItemScopePath * Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem>>
override this.PutAnalyticsItemAsync : Azure.ResourceManager.ApplicationInsights.Models.ItemScopePath * Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsComponentAnalyticsItem>>
Public Overridable Function PutAnalyticsItemAsync (scopePath As ItemScopePath, itemProperties As ApplicationInsightsComponentAnalyticsItem, Optional overrideItem As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ApplicationInsightsComponentAnalyticsItem))

Parameters

scopePath
ItemScopePath

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