Share via


ApplicationInsightsWebTestCollection.CreateOrUpdateAsync Method

Definition

Creates or updates an Application Insights web test definition.

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

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.

webTestName
String

The name of the Application Insights WebTest resource.

data
ApplicationInsightsWebTestData

Properties that need to be specified to create or update an Application Insights web test definition.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

webTestName or data is null.

Applies to