Skip to main content

analytics_items

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

Overview

Nameanalytics_items
TypeResource
Idazure.application_insights.analytics_items

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
ContentstringThe content of this item.
IdstringInternally assigned unique id of the item definition.
NamestringThe user-defined name of the item.
PropertiesobjectA set of properties that can be defined in the context of a specific item type. Each type may have its own properties.
ScopestringEnum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. Known values are: "shared" and "user". (shared, user)
TimeCreatedstringDate and time in UTC when this item was created.
TimeModifiedstringDate and time in UTC of the last modification that was made to this item.
TypestringEnum indicating the type of the Analytics item. Known values are: "none", "query", "recent", and "function". (none, query, recent, function)
VersionstringThis instance's version of the data model. This can change as new features are added.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, resource_name, scope_path, subscription_idid, nameGets a specific Analytics Items defined within an Application Insights component.
deletedeleteresource_group_name, resource_name, scope_path, subscription_idid, nameDeletes a specific Analytics Items defined within an Application Insights component.
putexecresource_group_name, resource_name, scope_path, subscription_idoverrideItemAdds or Updates a specific Analytics Item within an Application Insights component.
list_rawexecresource_group_name, resource_name, scope_path, subscription_idscope, type, includeContentGets a list of Analytics Items defined within 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
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the Application Insights component resource. Required.
scope_pathstringEnum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. Known values are: "analyticsItems" and "myanalyticsItems". Required.
subscription_idstring
idstringThe Id of a specific item defined in the Application Insights component. Default value is None.
includeContentbooleanFlag indicating whether or not to return the content of each applicable item. If false, only return the item information. Default value is None.
namestringThe name of a specific item defined in the Application Insights component. Default value is None.
overrideItembooleanFlag indicating whether or not to force save an item. This allows overriding an item if it already exists. Default value is None.
scopestringEnum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component. Known values are: "shared" and "user". Default value is None.
typestringEnum indicating the type of the Analytics item. Known values are: "none", "query", "function", "folder", and "recent". Default value is None.

SELECT examples

Gets a specific Analytics Items defined within an Application Insights component.

SELECT
Content,
Id,
Name,
Properties,
Scope,
TimeCreated,
TimeModified,
Type,
Version
FROM azure.application_insights.analytics_items
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND scope_path = '{{ scope_path }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND id = '{{ id }}'
AND name = '{{ name }}'
;

DELETE examples

Deletes a specific Analytics Items defined within an Application Insights component.

DELETE FROM azure.application_insights.analytics_items
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND scope_path = '{{ scope_path }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND id = '{{ id }}'
AND name = '{{ name }}'
;

Lifecycle Methods

Adds or Updates a specific Analytics Item within an Application Insights component.

EXEC azure.application_insights.analytics_items.put 
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@scope_path='{{ scope_path }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@overrideItem={{ overrideItem }}
@@json=
'{
"Id": "{{ Id }}",
"Name": "{{ Name }}",
"Content": "{{ Content }}",
"Scope": "{{ Scope }}",
"Type": "{{ Type }}",
"Properties": "{{ Properties }}"
}'
;