Skip to main content

annotations

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

Overview

Nameannotations
TypeResource
Idazure.application_insights.annotations

Fields

NameDatatypeDescription
AnnotationNamestringName of annotation
CategorystringCategory of annotation, free form
EventTimestringTime when event occurred
IdstringUnique Id for annotation
PropertiesstringSerialized JSON object for detailed properties
RelatedAnnotationstringRelated parent annotation if any

Methods

NameAccessible byRequired ParamsDescription
getSELECTannotationId, resourceGroupName, resourceName, subscriptionIdGet the annotation for given id.
listSELECTend, resourceGroupName, resourceName, start, subscriptionIdGets the list of annotations for a component for given time range
createINSERTresourceGroupName, resourceName, subscriptionIdCreate an Annotation of an Application Insights component.
deleteDELETEannotationId, resourceGroupName, resourceName, subscriptionIdDelete an Annotation of an Application Insights component.

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 end = '{{ end }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND start = '{{ start }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new annotations resource.

/*+ create */
INSERT INTO azure.application_insights.annotations (
resourceGroupName,
resourceName,
subscriptionId,
AnnotationName,
Category,
EventTime,
Id,
Properties,
RelatedAnnotation
)
SELECT
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ AnnotationName }}',
'{{ Category }}',
'{{ EventTime }}',
'{{ Id }}',
'{{ Properties }}',
'{{ RelatedAnnotation }}'
;

DELETE example

Deletes the specified annotations resource.

/*+ delete */
DELETE FROM azure.application_insights.annotations
WHERE annotationId = '{{ annotationId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';