favorites
Creates, updates, deletes, gets or lists a favorites resource.
Overview
| Name | favorites |
| Type | Resource |
| Id | azure.application_insights.favorites |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
Category | string | Favorite category, as defined by the user at creation time. |
Config | string | Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON. |
FavoriteId | string | Internally assigned unique id of the favorite definition. |
FavoriteType | string | Enum indicating if this favorite 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) |
IsGeneratedFromTemplate | boolean | Flag denoting wether or not this favorite was generated from a template. |
Name | string | The user-defined name of the favorite. |
SourceType | string | The source of the favorite definition. |
Tags | array | A list of 0 or more tags that are associated with this favorite definition. |
TimeModified | string | Date and time in UTC of the last modification that was made to this favorite definition. |
UserId | string | Unique user id of the specific user that owns this favorite. |
Version | string | This 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. |
| Name | Datatype | Description |
|---|---|---|
Category | string | Favorite category, as defined by the user at creation time. |
Config | string | Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON. |
FavoriteId | string | Internally assigned unique id of the favorite definition. |
FavoriteType | string | Enum indicating if this favorite 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) |
IsGeneratedFromTemplate | boolean | Flag denoting wether or not this favorite was generated from a template. |
Name | string | The user-defined name of the favorite. |
SourceType | string | The source of the favorite definition. |
Tags | array | A list of 0 or more tags that are associated with this favorite definition. |
TimeModified | string | Date and time in UTC of the last modification that was made to this favorite definition. |
UserId | string | Unique user id of the specific user that owns this favorite. |
Version | string | This 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
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, resource_name, favorite_id, subscription_id | Get a single favorite by its FavoriteId, defined within an Application Insights component. | |
list | select | resource_group_name, resource_name, subscription_id | favoriteType, sourceType, canFetchContent, tags | Gets a list of favorites defined within an Application Insights component. |
update | update | resource_group_name, resource_name, favorite_id, subscription_id | Updates a favorite that has already been added to an Application Insights component. | |
delete | delete | resource_group_name, resource_name, favorite_id, subscription_id | Remove a favorite that is associated to an Application Insights component. | |
add | exec | resource_group_name, resource_name, favorite_id, subscription_id | Adds a new favorites to 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 |
|---|---|---|
favorite_id | string | The Id of a specific favorite defined in the Application Insights component. 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. |
subscription_id | string | |
canFetchContent | boolean | Flag indicating whether or not to return the full content for each applicable favorite. If false, only return summary content for favorites. Default value is None. |
favoriteType | string | The type of favorite. Value can be either shared or user. Known values are: "shared" and "user". Default value is None. |
sourceType | string | Source type of favorite to return. When left out, the source type defaults to 'other' (not present in this enum). Known values are: "retention", "notebook", "sessions", "events", "userflows", "funnel", "impact", and "segmentation". Default value is None. |
tags | array | Tags that must be present on each favorite returned. Default value is None. |
SELECT examples
- get
- list
Get a single favorite by its FavoriteId, defined within an Application Insights component.
SELECT
Category,
Config,
FavoriteId,
FavoriteType,
IsGeneratedFromTemplate,
Name,
SourceType,
Tags,
TimeModified,
UserId,
Version
FROM azure.application_insights.favorites
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND favorite_id = '{{ favorite_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
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 resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND favoriteType = '{{ favoriteType }}'
AND sourceType = '{{ sourceType }}'
AND canFetchContent = '{{ canFetchContent }}'
AND tags = '{{ tags }}'
;
UPDATE examples
- update
Updates a favorite that has already been added to an Application Insights component.
UPDATE azure.application_insights.favorites
SET
Name = '{{ Name }}',
Config = '{{ Config }}',
Version = '{{ Version }}',
FavoriteType = '{{ FavoriteType }}',
SourceType = '{{ SourceType }}',
Tags = '{{ Tags }}',
Category = '{{ Category }}',
IsGeneratedFromTemplate = {{ IsGeneratedFromTemplate }}
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND favorite_id = '{{ favorite_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
Category,
Config,
FavoriteId,
FavoriteType,
IsGeneratedFromTemplate,
Name,
SourceType,
Tags,
TimeModified,
UserId,
Version;
DELETE examples
- delete
Remove a favorite that is associated to an Application Insights component.
DELETE FROM azure.application_insights.favorites
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND favorite_id = '{{ favorite_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- add
Adds a new favorites to an Application Insights component.
EXEC azure.application_insights.favorites.add
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@favorite_id='{{ favorite_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"Name": "{{ Name }}",
"Config": "{{ Config }}",
"Version": "{{ Version }}",
"FavoriteType": "{{ FavoriteType }}",
"SourceType": "{{ SourceType }}",
"Tags": "{{ Tags }}",
"Category": "{{ Category }}",
"IsGeneratedFromTemplate": {{ IsGeneratedFromTemplate }}
}'
;