recommendations
Creates, updates, deletes, gets or lists a recommendations resource.
Overview
| Name | recommendations |
| Type | Resource |
| Id | azure.web.recommendations |
Fields
The following fields are returned by SELECT queries:
- get_rule_details_by_web_app
- get_rule_details_by_hosting_environment
- list_history_for_hosting_environment
- list_history_for_web_app
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
actionName | string | Name of action that is recommended by this rule in string. |
bladeName | string | Deep link to a blade on the portal. Applicable to dynamic rule only. |
categoryTags | array | The list of category tags that this recommendation rule belongs to. |
channels | string | List of available channels that this rule applies. Known values are: "Notification", "Api", "Email", "Webhook", and "All". (Notification, Api, Email, Webhook, All) |
description | string | Localized detailed description of the rule. |
displayName | string | UI friendly name of the rule. |
extensionName | string | Extension name of the portal if exists. Applicable to dynamic rule only. |
forwardLink | string | Forward link to an external document associated with the rule. Applicable to dynamic rule only. |
isDynamic | boolean | True if this is associated with a dynamically added rule. |
kind | string | Kind of resource. |
level | string | Level of impact indicating how critical this rule is. Known values are: "Critical", "Warning", "Information", and "NonUrgentSuggestion". (Critical, Warning, Information, NonUrgentSuggestion) |
message | string | Localized name of the rule (Good for UI). |
recommendationId | string | Recommendation ID of an associated recommendation object tied to the rule, if exists. If such an object doesn't exist, it is set to null. |
recommendationName | string | Unique name of the rule. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
actionName | string | Name of action that is recommended by this rule in string. |
bladeName | string | Deep link to a blade on the portal. Applicable to dynamic rule only. |
categoryTags | array | The list of category tags that this recommendation rule belongs to. |
channels | string | List of available channels that this rule applies. Known values are: "Notification", "Api", "Email", "Webhook", and "All". (Notification, Api, Email, Webhook, All) |
description | string | Localized detailed description of the rule. |
displayName | string | UI friendly name of the rule. |
extensionName | string | Extension name of the portal if exists. Applicable to dynamic rule only. |
forwardLink | string | Forward link to an external document associated with the rule. Applicable to dynamic rule only. |
isDynamic | boolean | True if this is associated with a dynamically added rule. |
kind | string | Kind of resource. |
level | string | Level of impact indicating how critical this rule is. Known values are: "Critical", "Warning", "Information", and "NonUrgentSuggestion". (Critical, Warning, Information, NonUrgentSuggestion) |
message | string | Localized name of the rule (Good for UI). |
recommendationId | string | Recommendation ID of an associated recommendation object tied to the rule, if exists. If such an object doesn't exist, it is set to null. |
recommendationName | string | Unique name of the rule. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource Name. |
actionName | string | Name of action recommended by this object. |
bladeName | string | Deep link to a blade on the portal. |
categoryTags | array | The list of category tags that this recommendation belongs to. |
channels | string | List of channels that this recommendation can apply. Known values are: "Notification", "Api", "Email", "Webhook", and "All". (Notification, Api, Email, Webhook, All) |
creationTime | string (date-time) | Timestamp when this instance was created. |
displayName | string | UI friendly name of the rule (may not be unique). |
enabled | integer | True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. |
endTime | string (date-time) | The end time in UTC of a range that the recommendation refers to. |
extensionName | string | Extension name of the portal if exists. |
forwardLink | string | Forward link to an external document associated with the rule. |
isDynamic | boolean | True if this is associated with a dynamically added rule. |
kind | string | Kind of resource. |
level | string | Level indicating how critical this recommendation can impact. Known values are: "Critical", "Warning", "Information", and "NonUrgentSuggestion". (Critical, Warning, Information, NonUrgentSuggestion) |
message | string | Recommendation text. |
nextNotificationTime | string (date-time) | When to notify this recommendation next in UTC. Null means that this will never be notified anymore. |
notificationExpirationTime | string (date-time) | Date and time in UTC when this notification expires. |
notifiedTime | string (date-time) | Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet. |
recommendationId | string | A GUID value that each recommendation object is associated with. |
resourceId | string | Full ARM resource ID string that this recommendation object is associated with. |
resourceScope | string | Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. Known values are: "ServerFarm", "Subscription", and "WebSite". (ServerFarm, Subscription, WebSite) |
ruleName | string | Unique name of the rule. |
score | number | A metric value measured by the rule. |
startTime | string (date-time) | The beginning time in UTC of a range that the recommendation refers to. |
states | array | The list of states of this recommendation. If it's null then it should be considered "Active". |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource Name. |
actionName | string | Name of action recommended by this object. |
bladeName | string | Deep link to a blade on the portal. |
categoryTags | array | The list of category tags that this recommendation belongs to. |
channels | string | List of channels that this recommendation can apply. Known values are: "Notification", "Api", "Email", "Webhook", and "All". (Notification, Api, Email, Webhook, All) |
creationTime | string (date-time) | Timestamp when this instance was created. |
displayName | string | UI friendly name of the rule (may not be unique). |
enabled | integer | True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. |
endTime | string (date-time) | The end time in UTC of a range that the recommendation refers to. |
extensionName | string | Extension name of the portal if exists. |
forwardLink | string | Forward link to an external document associated with the rule. |
isDynamic | boolean | True if this is associated with a dynamically added rule. |
kind | string | Kind of resource. |
level | string | Level indicating how critical this recommendation can impact. Known values are: "Critical", "Warning", "Information", and "NonUrgentSuggestion". (Critical, Warning, Information, NonUrgentSuggestion) |
message | string | Recommendation text. |
nextNotificationTime | string (date-time) | When to notify this recommendation next in UTC. Null means that this will never be notified anymore. |
notificationExpirationTime | string (date-time) | Date and time in UTC when this notification expires. |
notifiedTime | string (date-time) | Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet. |
recommendationId | string | A GUID value that each recommendation object is associated with. |
resourceId | string | Full ARM resource ID string that this recommendation object is associated with. |
resourceScope | string | Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. Known values are: "ServerFarm", "Subscription", and "WebSite". (ServerFarm, Subscription, WebSite) |
ruleName | string | Unique name of the rule. |
score | number | A metric value measured by the rule. |
startTime | string (date-time) | The beginning time in UTC of a range that the recommendation refers to. |
states | array | The list of states of this recommendation. If it's null then it should be considered "Active". |
type | string | Resource type. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource Name. |
actionName | string | Name of action recommended by this object. |
bladeName | string | Deep link to a blade on the portal. |
categoryTags | array | The list of category tags that this recommendation belongs to. |
channels | string | List of channels that this recommendation can apply. Known values are: "Notification", "Api", "Email", "Webhook", and "All". (Notification, Api, Email, Webhook, All) |
creationTime | string (date-time) | Timestamp when this instance was created. |
displayName | string | UI friendly name of the rule (may not be unique). |
enabled | integer | True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. |
endTime | string (date-time) | The end time in UTC of a range that the recommendation refers to. |
extensionName | string | Extension name of the portal if exists. |
forwardLink | string | Forward link to an external document associated with the rule. |
isDynamic | boolean | True if this is associated with a dynamically added rule. |
kind | string | Kind of resource. |
level | string | Level indicating how critical this recommendation can impact. Known values are: "Critical", "Warning", "Information", and "NonUrgentSuggestion". (Critical, Warning, Information, NonUrgentSuggestion) |
message | string | Recommendation text. |
nextNotificationTime | string (date-time) | When to notify this recommendation next in UTC. Null means that this will never be notified anymore. |
notificationExpirationTime | string (date-time) | Date and time in UTC when this notification expires. |
notifiedTime | string (date-time) | Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet. |
recommendationId | string | A GUID value that each recommendation object is associated with. |
resourceId | string | Full ARM resource ID string that this recommendation object is associated with. |
resourceScope | string | Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. Known values are: "ServerFarm", "Subscription", and "WebSite". (ServerFarm, Subscription, WebSite) |
ruleName | string | Unique name of the rule. |
score | number | A metric value measured by the rule. |
startTime | string (date-time) | The beginning time in UTC of a range that the recommendation refers to. |
states | array | The list of states of this recommendation. If it's null then it should be considered "Active". |
type | string | Resource type. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_rule_details_by_web_app | select | resource_group_name, site_name, name, subscription_id | updateSeen, recommendationId | Get a recommendation rule for an app. Description for Get a recommendation rule for an app. |
get_rule_details_by_hosting_environment | select | resource_group_name, hosting_environment_name, name, subscription_id | updateSeen, recommendationId | Get a recommendation rule for an app. Description for Get a recommendation rule for an app. |
list_history_for_hosting_environment | select | resource_group_name, hosting_environment_name, subscription_id | expiredOnly, $filter | Get 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_app | select | resource_group_name, site_name, subscription_id | expiredOnly, $filter | Get 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 | select | subscription_id | featured, $filter | List all recommendations for a subscription. Description for List all recommendations for a subscription. |
list_recommended_rules_for_hosting_environment | exec | resource_group_name, hosting_environment_name, subscription_id | featured, $filter | Get all recommendations for a hosting environment. Description for Get all recommendations for a hosting environment. |
list_recommended_rules_for_web_app | exec | resource_group_name, site_name, subscription_id | featured, $filter | Get all recommendations for an app. Description for Get all recommendations for an app. |
disable_recommendation_for_site | exec | resource_group_name, site_name, name, subscription_id | Disables the specific rule for a web site permanently. Description for Disables the specific rule for a web site permanently. | |
disable_all_for_hosting_environment | exec | resource_group_name, hosting_environment_name, subscription_id, environmentName | Disable all recommendations for an app. Description for Disable all recommendations for an app. | |
reset_all_filters_for_hosting_environment | exec | resource_group_name, hosting_environment_name, subscription_id, environmentName | Reset all recommendation opt-out settings for an app. Description for Reset all recommendation opt-out settings for an app. | |
disable_recommendation_for_hosting_environment | exec | resource_group_name, name, hosting_environment_name, subscription_id, environmentName | Disables the specific rule for a web site permanently. Description for Disables the specific rule for a web site permanently. | |
disable_all_for_web_app | exec | resource_group_name, site_name, subscription_id | Disable all recommendations for an app. Description for Disable all recommendations for an app. | |
reset_all_filters_for_web_app | exec | resource_group_name, site_name, subscription_id | Reset all recommendation opt-out settings for an app. Description for Reset all recommendation opt-out settings for an app. | |
reset_all_filters | exec | subscription_id | Reset all recommendation opt-out settings for a subscription. Description for Reset all recommendation opt-out settings for a subscription. | |
disable_recommendation_for_subscription | exec | name, subscription_id | Disables 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.
| Name | Datatype | Description |
|---|---|---|
environmentName | string | Site name. Required. |
hosting_environment_name | string | Name of the hosting environment. Required. |
name | string | Rule name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
site_name | string | Name of the app. Required. |
subscription_id | string | |
$filter | string | Return 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. |
expiredOnly | boolean | Specify false to return all recommendations. The default is true, which returns only expired recommendations. Default value is None. |
featured | boolean | Specify true to return only the most critical recommendations. The default is false, which returns all recommendations. Default value is None. |
recommendationId | string | The 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. |
updateSeen | boolean | Specify true to update the last-seen timestamp of the recommendation object. Default value is None. |
SELECT examples
- get_rule_details_by_web_app
- get_rule_details_by_hosting_environment
- list_history_for_hosting_environment
- list_history_for_web_app
- list
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 }}'
;
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 hosting_environment_name = '{{ hosting_environment_name }}' -- required
AND name = '{{ name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND updateSeen = '{{ updateSeen }}'
AND recommendationId = '{{ recommendationId }}'
;
Get 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.
SELECT
id,
name,
actionName,
bladeName,
categoryTags,
channels,
creationTime,
displayName,
enabled,
endTime,
extensionName,
forwardLink,
isDynamic,
kind,
level,
message,
nextNotificationTime,
notificationExpirationTime,
notifiedTime,
recommendationId,
resourceId,
resourceScope,
ruleName,
score,
startTime,
states,
type
FROM azure.web.recommendations
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND hosting_environment_name = '{{ hosting_environment_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND expiredOnly = '{{ expiredOnly }}'
AND $filter = '{{ $filter }}'
;
Get 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.
SELECT
id,
name,
actionName,
bladeName,
categoryTags,
channels,
creationTime,
displayName,
enabled,
endTime,
extensionName,
forwardLink,
isDynamic,
kind,
level,
message,
nextNotificationTime,
notificationExpirationTime,
notifiedTime,
recommendationId,
resourceId,
resourceScope,
ruleName,
score,
startTime,
states,
type
FROM azure.web.recommendations
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND site_name = '{{ site_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND expiredOnly = '{{ expiredOnly }}'
AND $filter = '{{ $filter }}'
;
List all recommendations for a subscription. Description for List all recommendations for a subscription.
SELECT
id,
name,
actionName,
bladeName,
categoryTags,
channels,
creationTime,
displayName,
enabled,
endTime,
extensionName,
forwardLink,
isDynamic,
kind,
level,
message,
nextNotificationTime,
notificationExpirationTime,
notifiedTime,
recommendationId,
resourceId,
resourceScope,
ruleName,
score,
startTime,
states,
type
FROM azure.web.recommendations
WHERE subscription_id = '{{ subscription_id }}' -- required
AND featured = '{{ featured }}'
AND $filter = '{{ $filter }}'
;
Lifecycle Methods
- list_recommended_rules_for_hosting_environment
- list_recommended_rules_for_web_app
- disable_recommendation_for_site
- disable_all_for_hosting_environment
- reset_all_filters_for_hosting_environment
- disable_recommendation_for_hosting_environment
- disable_all_for_web_app
- reset_all_filters_for_web_app
- reset_all_filters
- disable_recommendation_for_subscription
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 }}'
;
Get all recommendations for an app. Description for Get all recommendations for an app.
EXEC azure.web.recommendations.list_recommended_rules_for_web_app
@resource_group_name='{{ resource_group_name }}' --required,
@site_name='{{ site_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@featured={{ featured }},
@$filter='{{ $filter }}'
;
Disables the specific rule for a web site permanently. Description for Disables the specific rule for a web site permanently.
EXEC azure.web.recommendations.disable_recommendation_for_site
@resource_group_name='{{ resource_group_name }}' --required,
@site_name='{{ site_name }}' --required,
@name='{{ name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Disable all recommendations for an app. Description for Disable all recommendations for an app.
EXEC azure.web.recommendations.disable_all_for_hosting_environment
@resource_group_name='{{ resource_group_name }}' --required,
@hosting_environment_name='{{ hosting_environment_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@environmentName='{{ environmentName }}' --required
;
Reset all recommendation opt-out settings for an app. Description for Reset all recommendation opt-out settings for an app.
EXEC azure.web.recommendations.reset_all_filters_for_hosting_environment
@resource_group_name='{{ resource_group_name }}' --required,
@hosting_environment_name='{{ hosting_environment_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@environmentName='{{ environmentName }}' --required
;
Disables the specific rule for a web site permanently. Description for Disables the specific rule for a web site permanently.
EXEC azure.web.recommendations.disable_recommendation_for_hosting_environment
@resource_group_name='{{ resource_group_name }}' --required,
@name='{{ name }}' --required,
@hosting_environment_name='{{ hosting_environment_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@environmentName='{{ environmentName }}' --required
;
Disable all recommendations for an app. Description for Disable all recommendations for an app.
EXEC azure.web.recommendations.disable_all_for_web_app
@resource_group_name='{{ resource_group_name }}' --required,
@site_name='{{ site_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Reset all recommendation opt-out settings for an app. Description for Reset all recommendation opt-out settings for an app.
EXEC azure.web.recommendations.reset_all_filters_for_web_app
@resource_group_name='{{ resource_group_name }}' --required,
@site_name='{{ site_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Reset all recommendation opt-out settings for a subscription. Description for Reset all recommendation opt-out settings for a subscription.
EXEC azure.web.recommendations.reset_all_filters
@subscription_id='{{ subscription_id }}' --required
;
Disables 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.
EXEC azure.web.recommendations.disable_recommendation_for_subscription
@name='{{ name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;