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:

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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectresource_group_name, resource_name, subscription_id, start, endGets the list of annotations for a component for given time range.
getselectresource_group_name, resource_name, annotation_id, subscription_idGet the annotation for given id.
createinsertresource_group_name, resource_name, subscription_idCreate an Annotation of an Application Insights component.
deletedeleteresource_group_name, resource_name, annotation_id, subscription_idDelete an Annotation of an Application Insights component.

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
annotation_idstringThe unique annotation ID. This is unique within a Application Insights component. Required.
endstringThe end time to query for annotations. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the Application Insights component resource. Required.
startstringThe start time to query from for annotations, cannot be older than 90 days from current date. Required.
subscription_idstring

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 resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- 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 (
AnnotationName,
Category,
EventTime,
Id,
Properties,
RelatedAnnotation,
resource_group_name,
resource_name,
subscription_id
)
SELECT
'{{ AnnotationName }}',
'{{ Category }}',
'{{ EventTime }}',
'{{ Id }}',
'{{ Properties }}',
'{{ RelatedAnnotation }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ subscription_id }}'
RETURNING
AnnotationName,
Category,
EventTime,
Id,
Properties,
RelatedAnnotation
;

DELETE examples

Delete an Annotation of an Application Insights component.

DELETE FROM azure.application_insights.annotations
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND annotation_id = '{{ annotation_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;