annotations
Creates, updates, deletes, gets or lists an annotations
resource.
Overview
Name | annotations |
Type | Resource |
Id | azure.application_insights.annotations |
Fields
The following fields are returned by SELECT
queries:
- list
successful operation
Name | Datatype | Description |
---|---|---|
AnnotationName | string | Name of annotation |
Category | string | Category of annotation, free form |
EventTime | string (date-time) | Time when event occurred |
Id | string | Unique Id for annotation |
Properties | string | Serialized JSON object for detailed properties |
RelatedAnnotation | string | Related parent annotation if any (default: null) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | resourceGroupName , subscriptionId , resourceName , start , end | Gets the list of annotations for a component for given time range | |
create | insert | resourceGroupName , subscriptionId , resourceName | Create an Annotation of an Application Insights component. | |
delete | delete | resourceGroupName , subscriptionId , resourceName , annotationId | Delete an Annotation of an Application Insights component. | |
get | exec | resourceGroupName , subscriptionId , resourceName , annotationId | Get 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.
Name | Datatype | Description |
---|---|---|
annotationId | string | The unique annotation ID. This is unique within a Application Insights component. |
end | string | The end time to query for annotations. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
resourceName | string | The name of the Application Insights component resource. |
start | string | The start time to query from for annotations, cannot be older than 90 days from current date. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
SELECT
examples
- list
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
- Manifest
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
;
# Description fields are for documentation purposes
- name: annotations
props:
- name: resourceGroupName
value: string
description: Required parameter for the annotations resource.
- name: subscriptionId
value: string (uuid)
description: Required parameter for the annotations resource.
- name: resourceName
value: string
description: Required parameter for the annotations resource.
- name: AnnotationName
value: string
description: |
Name of annotation
- name: Category
value: string
description: |
Category of annotation, free form
- name: EventTime
value: string
description: |
Time when event occurred
- name: Id
value: string
description: |
Unique Id for annotation
- name: Properties
value: string
description: |
Serialized JSON object for detailed properties
- name: RelatedAnnotation
value: string
description: |
Related parent annotation if any
default: null
DELETE
examples
- delete
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
Get the annotation for given id.
EXEC azure.application_insights.annotations.get
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@resourceName='{{ resourceName }}' --required,
@annotationId='{{ annotationId }}' --required
;