ApplicationInsightsComponentCollection.CreateOrUpdate 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 Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string resourceName, Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, resourceName As String, data As ApplicationInsightsComponentData, Optional cancellationToken As CancellationToken = Nothing) As 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