Skip to main content

recommendations

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

Overview

Namerecommendations
TypeResource
Idazure.web.recommendations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
actionNamestringName of action that is recommended by this rule in string.
bladeNamestringDeep link to a blade on the portal. Applicable to dynamic rule only.
categoryTagsarrayThe list of category tags that this recommendation rule belongs to.
channelsstringList of available channels that this rule applies. Known values are: "Notification", "Api", "Email", "Webhook", and "All". (Notification, Api, Email, Webhook, All)
descriptionstringLocalized detailed description of the rule.
displayNamestringUI friendly name of the rule.
extensionNamestringExtension name of the portal if exists. Applicable to dynamic rule only.
forwardLinkstringForward link to an external document associated with the rule. Applicable to dynamic rule only.
isDynamicbooleanTrue if this is associated with a dynamically added rule.
kindstringKind of resource.
levelstringLevel of impact indicating how critical this rule is. Known values are: "Critical", "Warning", "Information", and "NonUrgentSuggestion". (Critical, Warning, Information, NonUrgentSuggestion)
messagestringLocalized name of the rule (Good for UI).
recommendationIdstringRecommendation ID of an associated recommendation object tied to the rule, if exists. If such an object doesn't exist, it is set to null.
recommendationNamestringUnique name of the rule.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_rule_details_by_web_appselectresource_group_name, site_name, name, subscription_idupdateSeen, recommendationIdGet a recommendation rule for an app. Description for Get a recommendation rule for an app.
get_rule_details_by_hosting_environmentselectresource_group_name, hosting_environment_name, name, subscription_idupdateSeen, recommendationIdGet a recommendation rule for an app. Description for Get a recommendation rule for an app.
list_history_for_hosting_environmentselectresource_group_name, hosting_environment_name, subscription_idexpiredOnly, $filterGet past recommendations for an app, optionally specified by the time range. Description for Get past recommendations for an app, optionally specified by the time range.
list_history_for_web_appselectresource_group_name, site_name, subscription_idexpiredOnly, $filterGet past recommendations for an app, optionally specified by the time range. Description for Get past recommendations for an app, optionally specified by the time range.
listselectsubscription_idfeatured, $filterList all recommendations for a subscription. Description for List all recommendations for a subscription.
list_recommended_rules_for_hosting_environmentexecresource_group_name, hosting_environment_name, subscription_idfeatured, $filterGet all recommendations for a hosting environment. Description for Get all recommendations for a hosting environment.
list_recommended_rules_for_web_appexecresource_group_name, site_name, subscription_idfeatured, $filterGet all recommendations for an app. Description for Get all recommendations for an app.
disable_recommendation_for_siteexecresource_group_name, site_name, name, subscription_idDisables the specific rule for a web site permanently. Description for Disables the specific rule for a web site permanently.
disable_all_for_hosting_environmentexecresource_group_name, hosting_environment_name, subscription_id, environmentNameDisable all recommendations for an app. Description for Disable all recommendations for an app.
reset_all_filters_for_hosting_environmentexecresource_group_name, hosting_environment_name, subscription_id, environmentNameReset all recommendation opt-out settings for an app. Description for Reset all recommendation opt-out settings for an app.
disable_recommendation_for_hosting_environmentexecresource_group_name, name, hosting_environment_name, subscription_id, environmentNameDisables the specific rule for a web site permanently. Description for Disables the specific rule for a web site permanently.
disable_all_for_web_appexecresource_group_name, site_name, subscription_idDisable all recommendations for an app. Description for Disable all recommendations for an app.
reset_all_filters_for_web_appexecresource_group_name, site_name, subscription_idReset all recommendation opt-out settings for an app. Description for Reset all recommendation opt-out settings for an app.
reset_all_filtersexecsubscription_idReset all recommendation opt-out settings for a subscription. Description for Reset all recommendation opt-out settings for a subscription.
disable_recommendation_for_subscriptionexecname, subscription_idDisables the specified rule so it will not apply to a subscription in the future. Description for Disables the specified rule so it will not apply to a subscription in the future.

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
environmentNamestringSite name. Required.
hosting_environment_namestringName of the hosting environment. Required.
namestringRule name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
site_namestringName of the app. Required.
subscription_idstring
$filterstringReturn only channels specified in the filter. Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None.
expiredOnlybooleanSpecify false to return all recommendations. The default is true, which returns only expired recommendations. Default value is None.
recommendationIdstringThe GUID of the recommendation object if you query an expired one. You don't need to specify it to query an active entry. Default value is None.
updateSeenbooleanSpecify true to update the last-seen timestamp of the recommendation object. Default value is None.

SELECT examples

Get a recommendation rule for an app. Description for Get a recommendation rule for an app.

SELECT
id,
name,
actionName,
bladeName,
categoryTags,
channels,
description,
displayName,
extensionName,
forwardLink,
isDynamic,
kind,
level,
message,
recommendationId,
recommendationName,
systemData,
type
FROM azure.web.recommendations
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND site_name = '{{ site_name }}' -- required
AND name = '{{ name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND updateSeen = '{{ updateSeen }}'
AND recommendationId = '{{ recommendationId }}'
;

Lifecycle Methods

Get all recommendations for a hosting environment. Description for Get all recommendations for a hosting environment.

EXEC azure.web.recommendations.list_recommended_rules_for_hosting_environment 
@resource_group_name='{{ resource_group_name }}' --required,
@hosting_environment_name='{{ hosting_environment_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@featured={{ featured }},
@$filter='{{ $filter }}'
;