Delen via


ComponentsOperationsExtensions.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.

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.ApplicationInsights.Management.Models.ApplicationInsightsComponent> CreateOrUpdateAsync (this Microsoft.Azure.Management.ApplicationInsights.Management.IComponentsOperations operations, string resourceGroupName, string resourceName, Microsoft.Azure.Management.ApplicationInsights.Management.Models.ApplicationInsightsComponent insightProperties, System.Threading.CancellationToken cancellationToken = default);
static member CreateOrUpdateAsync : Microsoft.Azure.Management.ApplicationInsights.Management.IComponentsOperations * string * string * Microsoft.Azure.Management.ApplicationInsights.Management.Models.ApplicationInsightsComponent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.ApplicationInsights.Management.Models.ApplicationInsightsComponent>
<Extension()>
Public Function CreateOrUpdateAsync (operations As IComponentsOperations, resourceGroupName As String, resourceName As String, insightProperties As ApplicationInsightsComponent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ApplicationInsightsComponent)

Parameters

operations
IComponentsOperations

The operations group for this extension method.

resourceGroupName
String

The name of the resource group. The name is case insensitive.

resourceName
String

The name of the Application Insights component resource.

insightProperties
ApplicationInsightsComponent

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

cancellationToken
CancellationToken

The cancellation token.

Returns

Applies to