/// <summary> /// Get all Application Insights web test alerts definitioned within a /// subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <WebTest> > ListNextAsync(this IWebTestsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get a specific Application Insights web test definition. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='webTestName'> /// The name of the Application Insights webtest resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <WebTest> GetAsync(this IWebTestsOperations operations, string resourceGroupName, string webTestName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, webTestName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates an Application Insights web test definition. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='webTestName'> /// The name of the Application Insights webtest resource. /// </param> /// <param name='tags'> /// Resource tags /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <WebTest> UpdateTagsAsync(this IWebTestsOperations operations, string resourceGroupName, string webTestName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, webTestName, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get all Application Insights web tests defined for the specified component. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='componentName'> /// The name of the Application Insights component resource. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <WebTest> > ListByComponentAsync(this IWebTestsOperations operations, string componentName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByComponentWithHttpMessagesAsync(componentName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get a specific Application Insights web test definition. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='webTestName'> /// The name of the Application Insights webtest resource. /// </param> public static WebTest Get(this IWebTestsOperations operations, string resourceGroupName, string webTestName) { return(operations.GetAsync(resourceGroupName, webTestName).GetAwaiter().GetResult()); }
/// <summary> /// Get all Application Insights web tests defined within a specified resource /// group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> public static IPage <WebTest> ListByResourceGroup(this IWebTestsOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Get all Application Insights web test alerts definitioned within a /// subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <WebTest> ListNext(this IWebTestsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Get all Application Insights web test alerts definitioned within a /// subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <WebTest> List(this IWebTestsOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Deletes an Application Insights web test. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='webTestName'> /// The name of the Application Insights webtest resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IWebTestsOperations operations, string resourceGroupName, string webTestName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, webTestName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes an Application Insights web test. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='webTestName'> /// The name of the Application Insights webtest resource. /// </param> public static void Delete(this IWebTestsOperations operations, string resourceGroupName, string webTestName) { operations.DeleteAsync(resourceGroupName, webTestName).GetAwaiter().GetResult(); }
/// <summary> /// Creates or updates an Application Insights web test definition. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='webTestName'> /// The name of the Application Insights webtest resource. /// </param> /// <param name='tags'> /// Resource tags /// </param> public static WebTest UpdateTags(this IWebTestsOperations operations, string resourceGroupName, string webTestName, IDictionary <string, string> tags = default(IDictionary <string, string>)) { return(operations.UpdateTagsAsync(resourceGroupName, webTestName, tags).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates an Application Insights web test definition. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='webTestName'> /// The name of the Application Insights webtest resource. /// </param> /// <param name='webTestDefinition'> /// Properties that need to be specified to create or update an Application /// Insights web test definition. /// </param> public static WebTest CreateOrUpdate(this IWebTestsOperations operations, string resourceGroupName, string webTestName, WebTest webTestDefinition) { return(operations.CreateOrUpdateAsync(resourceGroupName, webTestName, webTestDefinition).GetAwaiter().GetResult()); }
/// <summary> /// Get all Application Insights web tests defined for the specified component. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='componentName'> /// The name of the Application Insights component resource. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> public static IPage <WebTest> ListByComponent(this IWebTestsOperations operations, string componentName, string resourceGroupName) { return(operations.ListByComponentAsync(componentName, resourceGroupName).GetAwaiter().GetResult()); }