Skip to main content

recommendations

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

Overview

Namerecommendations
TypeResource
Idaws.trustedadvisor.recommendations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID which identifies where the Recommendation was produced
namestringThe name of the AWS Trusted Advisor Recommendation
arnstringThe ARN of the Recommendation (pattern: <code>arn:[\w-]+:trustedadvisor::\d{12}:recommendation/[\w-]+</code>)
aws_servicesarrayThe AWS Services that the Recommendation applies to
check_arnstringThe AWS Trusted Advisor Check ARN that relates to the Recommendation
created_atstring (date-time)When the Recommendation was created, if created by AWS Trusted Advisor Priority
created_bystringThe creator, if created by AWS Trusted Advisor Priority
descriptionstringA description for AWS Trusted Advisor recommendations
last_updated_atstring (date-time)When the Recommendation was last updated
lifecycle_stagestringThe lifecycle stage from AWS Trusted Advisor Priority (in_progress, pending_response, dismissed, resolved)
pillar_specific_aggregatesobjectThe pillar aggregations for cost savings
pillarsarrayThe Pillars that the Recommendation is optimizing
resolved_atstring (date-time)When the Recommendation was resolved
resources_aggregatesobjectAn aggregation of all resources
sourcestringThe source of the Recommendation (aws_config, compute_optimizer, cost_explorer, lse, manual, pse, rds, resilience, resilience_hub, security_hub, stir, ta_check, well_architected, cost_optimization_hub)
statusstringThe status of the Recommendation (ok, warning, error)
status_reasonstringThis attribute provides additional details about potential discrepancies in check status determination. (no_data_ok)
type_stringWhether the Recommendation was automated or generated by AWS Trusted Advisor Priority (standard, priority)
update_reasonstringReason for the lifecycle stage change (pattern: <code>[\s\S]*</code>)
update_reason_codestringReason code for the lifecycle state change (non_critical_account, temporary_account, valid_business_case, other_methods_available, low_priority, not_applicable, other)
updated_on_behalf_ofstringThe person on whose behalf a Technical Account Manager (TAM) updated the recommendation. This information is only available when a Technical Account Manager takes an action on a recommendation managed by AWS Trusted Advisor Priority
updated_on_behalf_of_job_titlestringThe job title of the person on whose behalf a Technical Account Manager (TAM) updated the recommendation. This information is only available when a Technical Account Manager takes an action on a recommendation managed by AWS Trusted Advisor Priority

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_recommendationselectrecommendation_identifier, regionlanguageGet a specific Recommendation. This API provides global recommendations, eliminating the need to call the API in each AWS Region.
list_recommendationsselectregionnextToken, maxResults, type, status, pillar, awsService, source, checkIdentifier, afterLastUpdatedAt, beforeLastUpdatedAt, languageList a filterable set of Recommendations. This API provides global recommendations, eliminating the need to call the API in each AWS Region.
update_recommendation_lifecycleupdaterecommendation_identifier, region, lifecycleStageUpdate the lifecyle of a Recommendation. This API only supports prioritized recommendations and updates global priority recommendations, eliminating the need to call the API in each AWS Region.

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
recommendation_identifierstringThe Recommendation identifier for AWS Trusted Advisor Priority recommendations
regionstringAWS region (default: us-east-1)
afterLastUpdatedAtstring (date-time)After the last update of the Recommendation
awsServicestringThe aws service associated with the Recommendation
beforeLastUpdatedAtstring (date-time)Before the last update of the Recommendation
checkIdentifierstringThe check identifier of the Recommendation
languagestringThe ISO 639-1 code for the language that you want your recommendations to appear in.
maxResultsintegerThe maximum number of results to return per page.
nextTokenstringThe token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
pillarstringThe pillar of the Recommendation
sourcestringThe source of the Recommendation
statusstringThe status of the Recommendation
typestringThe type of the Recommendation

SELECT examples

Get a specific Recommendation. This API provides global recommendations, eliminating the need to call the API in each AWS Region.

SELECT
id,
name,
arn,
aws_services,
check_arn,
created_at,
created_by,
description,
last_updated_at,
lifecycle_stage,
pillar_specific_aggregates,
pillars,
resolved_at,
resources_aggregates,
source,
status,
status_reason,
type_,
update_reason,
update_reason_code,
updated_on_behalf_of,
updated_on_behalf_of_job_title
FROM aws.trustedadvisor.recommendations
WHERE recommendation_identifier = '{{ recommendation_identifier }}' -- required
AND region = '{{ region }}' -- required
AND language = '{{ language }}'
;

UPDATE examples

Update the lifecyle of a Recommendation. This API only supports prioritized recommendations and updates global priority recommendations, eliminating the need to call the API in each AWS Region.

UPDATE aws.trustedadvisor.recommendations
SET
lifecycleStage = '{{ lifecycleStage }}',
updateReason = '{{ updateReason }}',
updateReasonCode = '{{ updateReasonCode }}'
WHERE
recommendation_identifier = '{{ recommendation_identifier }}' --required
AND region = '{{ region }}' --required
AND lifecycleStage = '{{ lifecycleStage }}' --required;