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
- get
| 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. |
| 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | resource_group_name, resource_name, subscription_id, start, end | Gets the list of annotations for a component for given time range. | |
get | select | resource_group_name, resource_name, annotation_id, subscription_id | Get the annotation for given id. | |
create | insert | resource_group_name, resource_name, subscription_id | Create an Annotation of an Application Insights component. | |
delete | delete | resource_group_name, resource_name, annotation_id, subscription_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
annotation_id | string | The unique annotation ID. This is unique within a Application Insights component. Required. |
end | string | The end time to query for annotations. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
resource_name | string | The name of the Application Insights component resource. Required. |
start | string | The start time to query from for annotations, cannot be older than 90 days from current date. Required. |
subscription_id | string |
SELECT examples
- list
- get
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
;
Get the annotation for given id.
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 annotation_id = '{{ annotation_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: annotations
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the annotations resource.
- name: resource_name
value: "{{ resource_name }}"
description: Required parameter for the annotations resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the annotations resource.
- name: AnnotationName
value: "{{ AnnotationName }}"
description: |
Name of annotation.
- name: Category
value: "{{ Category }}"
description: |
Category of annotation, free form.
- name: EventTime
value: "{{ EventTime }}"
description: |
Time when event occurred.
- name: Id
value: "{{ Id }}"
description: |
Unique Id for annotation.
- name: Properties
value: "{{ Properties }}"
description: |
Serialized JSON object for detailed properties.
- name: RelatedAnnotation
value: "{{ RelatedAnnotation }}"
description: |
Related parent annotation if any.
DELETE examples
- delete
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
;