/// <summary> /// Gets a list of all Application Insights components within a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ApplicationInsightsComponent> > ListAsync(this IComponentsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get status for an ongoing purge operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='purgeId'> /// In a purge status request, this is the Id of the operation the status of /// which is returned. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ComponentPurgeStatusResponse> GetPurgeStatusAsync(this IComponentsOperations operations, string resourceGroupName, string resourceName, string purgeId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetPurgeStatusWithHttpMessagesAsync(resourceGroupName, resourceName, purgeId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates an existing component's tags. To update other fields use the /// CreateOrUpdate method. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='tags'> /// Resource tags /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApplicationInsightsComponent> UpdateTagsAsync(this IComponentsOperations operations, string resourceGroupName, string resourceName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates (or updates) an Application Insights component. Note: You cannot /// specify a different value for InstrumentationKey nor AppId in the Put /// operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='insightProperties'> /// Properties that need to be specified to create an Application Insights /// component. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ApplicationInsightsComponent> CreateOrUpdateAsync(this IComponentsOperations operations, string resourceGroupName, string resourceName, ApplicationInsightsComponent insightProperties, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, insightProperties, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes an Application Insights component. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> public static void Delete(this IComponentsOperations operations, string resourceGroupName, string resourceName) { operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); }
/// <summary> /// Gets a list of Application Insights components within a resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> public static IPage <ApplicationInsightsComponent> ListByResourceGroup(this IComponentsOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of Application Insights components within a resource group. /// </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 <ApplicationInsightsComponent> ListByResourceGroupNext(this IComponentsOperations operations, string nextPageLink) { return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Get status for an ongoing purge operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='purgeId'> /// In a purge status request, this is the Id of the operation the status of /// which is returned. /// </param> public static ComponentPurgeStatusResponse GetPurgeStatus(this IComponentsOperations operations, string resourceGroupName, string resourceName, string purgeId) { return(operations.GetPurgeStatusAsync(resourceGroupName, resourceName, purgeId).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of all Application Insights components within a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <ApplicationInsightsComponent> List(this IComponentsOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Purges data in an Application Insights component by a set of user-defined /// filters. /// /// In order to manage system resources, purge requests are throttled at 50 /// requests per hour. You should batch the execution of purge requests by /// sending a single command whose predicate includes all user identities that /// require purging. Use the in operator to specify multiple identities. You /// should run the query prior to using for a purge request to verify that the /// results are expected. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='body'> /// Describes the body of a request to purge data in a single table of an /// Application Insights component /// </param> public static ComponentPurgeResponse Purge(this IComponentsOperations operations, string resourceGroupName, string resourceName, ComponentPurgeBody body) { return(operations.PurgeAsync(resourceGroupName, resourceName, body).GetAwaiter().GetResult()); }
/// <summary> /// Updates an existing component's tags. To update other fields use the /// CreateOrUpdate method. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='tags'> /// Resource tags /// </param> public static ApplicationInsightsComponent UpdateTags(this IComponentsOperations operations, string resourceGroupName, string resourceName, IDictionary <string, string> tags = default(IDictionary <string, string>)) { return(operations.UpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult()); }
/// <summary> /// Creates (or updates) an Application Insights component. Note: You cannot /// specify a different value for InstrumentationKey nor AppId in the Put /// operation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='insightProperties'> /// Properties that need to be specified to create an Application Insights /// component. /// </param> public static ApplicationInsightsComponent CreateOrUpdate(this IComponentsOperations operations, string resourceGroupName, string resourceName, ApplicationInsightsComponent insightProperties) { return(operations.CreateOrUpdateAsync(resourceGroupName, resourceName, insightProperties).GetAwaiter().GetResult()); }
/// <summary> /// Returns an Application Insights component. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> public static ApplicationInsightsComponent Get(this IComponentsOperations operations, string resourceGroupName, string resourceName) { return(operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes an Application Insights component. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// The name of the Application Insights component resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IComponentsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }