recommendations
Creates, updates, deletes, gets or lists a recommendations resource.
Overview
| Name | recommendations |
| Type | Resource |
| Id | azure.advisor.recommendations |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The resource ID. |
name | string | The name of the resource. |
actions | array | The list of recommended actions to implement recommendation. |
category | string | The category of the recommendation. Known values are: "HighAvailability", "Security", "Performance", "Cost", and "OperationalExcellence". |
description | string | The detailed description of recommendation. |
exposedMetadataProperties | object | The recommendation metadata properties exposed to customer to provide additional information. |
extendedProperties | object | Extended properties. |
impact | string | The business impact of the recommendation. Known values are: "High", "Medium", and "Low". |
impactedField | string | The resource type identified by Advisor. |
impactedValue | string | The resource identified by Advisor. |
label | string | The label of recommendation. |
lastUpdated | string (date-time) | The most recent time that Advisor checked the validity of the recommendation. |
learnMoreLink | string | The link to learn more about recommendation and generation logic. |
metadata | object | The recommendation metadata. |
potentialBenefits | string | The potential benefit of implementing recommendation. |
recommendationTypeId | string | The recommendation-type GUID. |
remediation | object | The automated way to apply recommendation. |
resourceMetadata | object | Metadata of resource that was assessed. |
shortDescription | object | A summary of the recommendation. |
suppressionIds | array | The list of snoozed and dismissed rules for the recommendation. |
type | string | The type of the resource. |
| Name | Datatype | Description |
|---|---|---|
id | string | The resource ID. |
name | string | The name of the resource. |
actions | array | The list of recommended actions to implement recommendation. |
category | string | The category of the recommendation. Known values are: "HighAvailability", "Security", "Performance", "Cost", and "OperationalExcellence". |
description | string | The detailed description of recommendation. |
exposedMetadataProperties | object | The recommendation metadata properties exposed to customer to provide additional information. |
extendedProperties | object | Extended properties. |
impact | string | The business impact of the recommendation. Known values are: "High", "Medium", and "Low". |
impactedField | string | The resource type identified by Advisor. |
impactedValue | string | The resource identified by Advisor. |
label | string | The label of recommendation. |
lastUpdated | string (date-time) | The most recent time that Advisor checked the validity of the recommendation. |
learnMoreLink | string | The link to learn more about recommendation and generation logic. |
metadata | object | The recommendation metadata. |
potentialBenefits | string | The potential benefit of implementing recommendation. |
recommendationTypeId | string | The recommendation-type GUID. |
remediation | object | The automated way to apply recommendation. |
resourceMetadata | object | Metadata of resource that was assessed. |
shortDescription | object | A summary of the recommendation. |
suppressionIds | array | The list of snoozed and dismissed rules for the recommendation. |
type | string | The type of the resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_uri, recommendation_id | Obtains details of a cached recommendation. | |
list | select | subscription_id | $filter, $top, $skipToken | Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations. |
get_generate_status | exec | operation_id, subscription_id | Retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header. | |
generate | exec | subscription_id | Initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service. |
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 |
|---|---|---|
operation_id | string | The operation ID, which can be found from the Location field in the generate recommendation response header. Required. |
recommendation_id | string | The recommendation ID. Required. |
resource_uri | string | The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. Required. |
subscription_id | string | |
$filter | string | The filter to apply to the recommendations.\ Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '\ Category <#category>_\ '] with operators ['eq', 'and', 'or'].\ Example:\ - $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup'. Default value is None. |
$skipToken | string | The page-continuation token to use with a paged version of this API. Default value is None. |
$top | integer | The number of recommendations per page if a paged version of this API is being used. Default value is None. |
SELECT examples
- get
- list
Obtains details of a cached recommendation.
SELECT
id,
name,
actions,
category,
description,
exposedMetadataProperties,
extendedProperties,
impact,
impactedField,
impactedValue,
label,
lastUpdated,
learnMoreLink,
metadata,
potentialBenefits,
recommendationTypeId,
remediation,
resourceMetadata,
shortDescription,
suppressionIds,
type
FROM azure.advisor.recommendations
WHERE resource_uri = '{{ resource_uri }}' -- required
AND recommendation_id = '{{ recommendation_id }}' -- required
;
Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
SELECT
id,
name,
actions,
category,
description,
exposedMetadataProperties,
extendedProperties,
impact,
impactedField,
impactedValue,
label,
lastUpdated,
learnMoreLink,
metadata,
potentialBenefits,
recommendationTypeId,
remediation,
resourceMetadata,
shortDescription,
suppressionIds,
type
FROM azure.advisor.recommendations
WHERE subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skipToken = '{{ $skipToken }}'
;
Lifecycle Methods
- get_generate_status
- generate
Retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header.
EXEC azure.advisor.recommendations.get_generate_status
@operation_id='{{ operation_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service.
EXEC azure.advisor.recommendations.generate
@subscription_id='{{ subscription_id }}' --required
;