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:

A single item associated with the Application Insights component.

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.
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.
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
getselectsubscriptionId, resourceGroupName, resourceName, scopePathid, nameGets a specific Analytics Items defined within an Application Insights component.
putreplacesubscriptionId, resourceGroupName, resourceName, scopePathoverrideItemAdds or Updates a specific Analytics Item within an Application Insights component.
deletedeletesubscriptionId, resourceGroupName, resourceName, scopePathid, nameDeletes a specific Analytics Items defined within an Application Insights component.
listexecsubscriptionId, resourceGroupName, resourceName, scopePathscope, 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
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
resourceNamestringThe name of the Application Insights component resource.
scopePathstringEnum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
idstringThe Id of a specific item defined in the Application Insights component
includeContentbooleanFlag indicating whether or not to return the content of each applicable item. If false, only return the item information.
namestringThe name of a specific item defined in the Application Insights component
overrideItembooleanFlag indicating whether or not to force save an item. This allows overriding an item if it already exists.
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.
typestringEnum indicating the type of the Analytics item.

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 subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND scopePath = '{{ scopePath }}' -- required
AND id = '{{ id }}'
AND name = '{{ name }}'
;

REPLACE examples

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

REPLACE azure.application_insights.analytics_items
SET
data__Id = '{{ Id }}',
data__Name = '{{ Name }}',
data__Content = '{{ Content }}',
data__Scope = '{{ Scope }}',
data__Type = '{{ Type }}',
data__Properties = '{{ Properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND resourceName = '{{ resourceName }}' --required
AND scopePath = '{{ scopePath }}' --required
AND overrideItem = {{ overrideItem}}
RETURNING
Content,
Id,
Name,
Properties,
Scope,
TimeCreated,
TimeModified,
Type,
Version;

DELETE examples

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

DELETE FROM azure.application_insights.analytics_items
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND resourceName = '{{ resourceName }}' --required
AND scopePath = '{{ scopePath }}' --required
AND id = '{{ id }}'
AND name = '{{ name }}'
;

Lifecycle Methods

Gets a list of Analytics Items defined within an Application Insights component.

EXEC azure.application_insights.analytics_items.list 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@resourceName='{{ resourceName }}' --required,
@scopePath='{{ scopePath }}' --required,
@scope='{{ scope }}',
@type='{{ type }}',
@includeContent={{ includeContent }}
;