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
A favorite definition associated to the Application Insights component.
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. |
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 | resourceGroupName , subscriptionId , resourceName , favoriteId | Get a single favorite by its FavoriteId, defined within an Application Insights component. | |
update | update | resourceGroupName , subscriptionId , resourceName , favoriteId | Updates a favorite that has already been added to an Application Insights component. | |
delete | delete | resourceGroupName , subscriptionId , resourceName , favoriteId | Remove a favorite that is associated to an Application Insights component. | |
list | exec | resourceGroupName , subscriptionId , resourceName | favoriteType , sourceType , canFetchContent , tags | Gets a list of favorites defined within an Application Insights component. |
add | exec | resourceGroupName , subscriptionId , resourceName , favoriteId | 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 |
---|---|---|
favoriteId | string | The Id of a specific favorite defined in the Application Insights component |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
resourceName | string | The name of the Application Insights component resource. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
canFetchContent | boolean | Flag indicating whether or not to return the full content for each applicable favorite. If false, only return summary content for favorites. |
favoriteType | string | The type of favorite. Value can be either shared or user. |
sourceType | string | Source type of favorite to return. When left out, the source type defaults to 'other' (not present in this enum). |
tags | array | Tags that must be present on each favorite returned. |
SELECT
examples
- get
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 resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND favoriteId = '{{ favoriteId }}' -- required
;
UPDATE
examples
- update
Updates a favorite that has already been added to an Application Insights component.
UPDATE azure.application_insights.favorites
SET
data__Name = '{{ Name }}',
data__Config = '{{ Config }}',
data__Version = '{{ Version }}',
data__FavoriteType = '{{ FavoriteType }}',
data__SourceType = '{{ SourceType }}',
data__Tags = '{{ Tags }}',
data__Category = '{{ Category }}',
data__IsGeneratedFromTemplate = {{ IsGeneratedFromTemplate }}
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND resourceName = '{{ resourceName }}' --required
AND favoriteId = '{{ favoriteId }}' --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 resourceGroupName = '{{ resourceGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND resourceName = '{{ resourceName }}' --required
AND favoriteId = '{{ favoriteId }}' --required
;
Lifecycle Methods
- list
- add
Gets a list of favorites defined within an Application Insights component.
EXEC azure.application_insights.favorites.list
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@resourceName='{{ resourceName }}' --required,
@favoriteType='{{ favoriteType }}',
@sourceType='{{ sourceType }}',
@canFetchContent={{ canFetchContent }},
@tags='{{ tags }}'
;
Adds a new favorites to an Application Insights component.
EXEC azure.application_insights.favorites.add
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@resourceName='{{ resourceName }}' --required,
@favoriteId='{{ favoriteId }}' --required
@@json=
'{
"Name": "{{ Name }}",
"Config": "{{ Config }}",
"Version": "{{ Version }}",
"FavoriteType": "{{ FavoriteType }}",
"SourceType": "{{ SourceType }}",
"Tags": "{{ Tags }}",
"Category": "{{ Category }}",
"IsGeneratedFromTemplate": {{ IsGeneratedFromTemplate }}
}'
;