Skip to main content

annotations

Creates, updates, deletes, gets or lists an annotations resource.

Overview

Nameannotations
TypeResource
Idazure.application_insights.annotations

Fields

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
AnnotationNamestringName of annotation
CategorystringCategory of annotation, free form
EventTimestring (date-time)Time when event occurred
IdstringUnique Id for annotation
PropertiesstringSerialized JSON object for detailed properties
RelatedAnnotationstringRelated parent annotation if any (default: null)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectresourceGroupName, subscriptionId, resourceName, start, endGets the list of annotations for a component for given time range
createinsertresourceGroupName, subscriptionId, resourceNameCreate an Annotation of an Application Insights component.
deletedeleteresourceGroupName, subscriptionId, resourceName, annotationIdDelete an Annotation of an Application Insights component.
getexecresourceGroupName, subscriptionId, resourceName, annotationIdGet the annotation for given id.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
annotationIdstringThe unique annotation ID. This is unique within a Application Insights component.
endstringThe end time to query for annotations.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
resourceNamestringThe name of the Application Insights component resource.
startstringThe start time to query from for annotations, cannot be older than 90 days from current date.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Gets the list of annotations for a component for given time range

SELECT
AnnotationName,
Category,
EventTime,
Id,
Properties,
RelatedAnnotation
FROM azure.application_insights.annotations
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND start = '{{ start }}' -- required
AND end = '{{ end }}' -- required
;

INSERT examples

Create an Annotation of an Application Insights component.

INSERT INTO azure.application_insights.annotations (
data__AnnotationName,
data__Category,
data__EventTime,
data__Id,
data__Properties,
data__RelatedAnnotation,
resourceGroupName,
subscriptionId,
resourceName
)
SELECT
'{{ AnnotationName }}',
'{{ Category }}',
'{{ EventTime }}',
'{{ Id }}',
'{{ Properties }}',
'{{ RelatedAnnotation }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ resourceName }}'
RETURNING
AnnotationName,
Category,
EventTime,
Id,
Properties,
RelatedAnnotation
;

DELETE examples

Delete an Annotation of an Application Insights component.

DELETE FROM azure.application_insights.annotations
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND resourceName = '{{ resourceName }}' --required
AND annotationId = '{{ annotationId }}' --required
;

Lifecycle Methods

Get the annotation for given id.

EXEC azure.application_insights.annotations.get 
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@resourceName='{{ resourceName }}' --required,
@annotationId='{{ annotationId }}' --required
;