ApplicationInsightsComponentCollection.CreateOrUpdateAsync Method

Definition

Creates (or updates) an Application Insights component. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}
  • Operation Id: Components_CreateOrUpdate
  • Default Api Version: 2020-02-02
  • Resource: ApplicationInsightsComponentResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string resourceName, Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, resourceName As String, data As ApplicationInsightsComponentData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ApplicationInsightsComponentResource))

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.

resourceName
String

The name of the Application Insights component resource.

data
ApplicationInsightsComponentData

Properties that need to be specified to create an Application Insights component.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

resourceName or data is null.

Applies to