Skip to main content

favorites

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

Overview

Namefavorites
TypeResource
Idazure.application_insights.favorites

Fields

NameDatatypeDescription
CategorystringFavorite category, as defined by the user at creation time.
ConfigstringConfiguration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON
FavoriteIdstringInternally assigned unique id of the favorite definition.
FavoriteTypestringEnum indicating if this favorite definition is owned by a specific user or is shared between all users with access to the Application Insights component.
IsGeneratedFromTemplatebooleanFlag denoting wether or not this favorite was generated from a template.
NamestringThe user-defined name of the favorite.
SourceTypestringThe source of the favorite definition.
TagsarrayA list of 0 or more tags that are associated with this favorite definition
TimeModifiedstringDate and time in UTC of the last modification that was made to this favorite definition.
UserIdstringUnique user id of the specific user that owns this favorite.
VersionstringThis instance's version of the data model. This can change as new features are added that can be marked favorite. Current examples include MetricsExplorer (ME) and Search.

Methods

NameAccessible byRequired ParamsDescription
getSELECTfavoriteId, resourceGroupName, resourceName, subscriptionIdGet a single favorite by its FavoriteId, defined within an Application Insights component.
listSELECTresourceGroupName, resourceName, subscriptionIdGets a list of favorites defined within an Application Insights component.
deleteDELETEfavoriteId, resourceGroupName, resourceName, subscriptionIdRemove a favorite that is associated to an Application Insights component.
updateUPDATEfavoriteId, resourceGroupName, resourceName, subscriptionIdUpdates a favorite that has already been added to an Application Insights component.
addEXECfavoriteId, resourceGroupName, resourceName, subscriptionIdAdds a new favorites to an Application Insights component.

SELECT examples

Gets a list of favorites defined within an Application Insights component.

SELECT
Category,
Config,
FavoriteId,
FavoriteType,
IsGeneratedFromTemplate,
Name,
SourceType,
Tags,
TimeModified,
UserId,
Version
FROM azure.application_insights.favorites
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

UPDATE example

Updates a favorites resource.

/*+ update */
UPDATE azure.application_insights.favorites
SET
Name = '{{ Name }}',
Config = '{{ Config }}',
Version = '{{ Version }}',
FavoriteType = '{{ FavoriteType }}',
SourceType = '{{ SourceType }}',
Tags = '{{ Tags }}',
Category = '{{ Category }}',
IsGeneratedFromTemplate = true|false
WHERE
favoriteId = '{{ favoriteId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified favorites resource.

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