/// <summary> /// Gets the list of annotations for a component for given time range /// </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='start'> /// The start time to query from for annotations, cannot be older than 90 days /// from current date. /// </param> /// <param name='end'> /// The end time to query for annotations. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <Annotation> > ListAsync(this IAnnotationsOperations operations, string resourceGroupName, string resourceName, string start, string end, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, start, end, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete an Annotation of 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='annotationId'> /// The unique annotation ID. This is unique within a Application Insights /// component. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> DeleteAsync(this IAnnotationsOperations operations, string resourceGroupName, string resourceName, string annotationId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, annotationId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create an Annotation of 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='annotationProperties'> /// Properties that need to be specified to create an annotation of a /// Application Insights component. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <Annotation> > CreateAsync(this IAnnotationsOperations operations, string resourceGroupName, string resourceName, Annotation annotationProperties, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, resourceName, annotationProperties, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create an Annotation of 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='annotationProperties'> /// Properties that need to be specified to create an annotation of a /// Application Insights component. /// </param> public static IList <Annotation> Create(this IAnnotationsOperations operations, string resourceGroupName, string resourceName, Annotation annotationProperties) { return(operations.CreateAsync(resourceGroupName, resourceName, annotationProperties).GetAwaiter().GetResult()); }
/// <summary> /// Gets the list of annotations for a component for given time range /// </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='start'> /// The start time to query from for annotations, cannot be older than 90 days /// from current date. /// </param> /// <param name='end'> /// The end time to query for annotations. /// </param> public static IEnumerable <Annotation> List(this IAnnotationsOperations operations, string resourceGroupName, string resourceName, string start, string end) { return(operations.ListAsync(resourceGroupName, resourceName, start, end).GetAwaiter().GetResult()); }
/// <summary> /// Get the annotation for given id. /// </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='annotationId'> /// The unique annotation ID. This is unique within a Application Insights /// component. /// </param> public static IList <Annotation> Get(this IAnnotationsOperations operations, string resourceGroupName, string resourceName, string annotationId) { return(operations.GetAsync(resourceGroupName, resourceName, annotationId).GetAwaiter().GetResult()); }
/// <summary> /// Delete an Annotation of 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='annotationId'> /// The unique annotation ID. This is unique within a Application Insights /// component. /// </param> public static object Delete(this IAnnotationsOperations operations, string resourceGroupName, string resourceName, string annotationId) { return(operations.DeleteAsync(resourceGroupName, resourceName, annotationId).GetAwaiter().GetResult()); }
/// <summary> /// Delete an Annotation of 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='annotationId'> /// The unique annotation ID. This is unique within a Application Insights /// component. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IAnnotationsOperations operations, string resourceGroupName, string resourceName, string annotationId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, annotationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete an Annotation of 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='annotationId'> /// The unique annotation ID. This is unique within a Application Insights /// component. /// </param> public static void Delete(this IAnnotationsOperations operations, string resourceGroupName, string resourceName, string annotationId) { operations.DeleteAsync(resourceGroupName, resourceName, annotationId).GetAwaiter().GetResult(); }