recommendations_for_resources
Creates, updates, deletes, gets or lists a recommendations_for_resources resource.
Overview
| Name | recommendations_for_resources |
| Type | Resource |
| Id | aws.trustedadvisor.recommendations_for_resources |
Fields
The following fields are returned by SELECT queries:
- list_recommendations_for_resource
| Name | Datatype | Description |
|---|---|---|
aws_resource_arn | string | The AWS Resource ARN (pattern: <code>arn:aws(-\w+):[\w\d-]+:([\w\d-])?:[\w\d_-]([:/].+)</code>) |
check_arn | string | The Check ARN (pattern: <code>arn:[\w-]+:trustedadvisor:::check/[\w-]+</code>) |
exclusion_status | string | The exclusion status of the recommendation (excluded, included) |
last_updated_at | string (date-time) | When the recommendation was last updated |
metadata | object | Metadata associated with the recommendation |
pillars | array | The Pillars that the Recommendation is optimizing |
recommendation_arn | string | The Recommendation ARN (pattern: <code>arn:[\w-]+:trustedadvisor::\d{12}:recommendation/[\w-]+</code>) |
status | string | The current status of the recommendation (ok, warning, error) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_recommendations_for_resource | select | aws_resource_arn, region | nextToken, maxResults, pillar, status, checkArn, language | List all Trusted Advisor recommendations for a given AWS resource ARN. |
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 |
|---|---|---|
aws_resource_arn | string | The ARN of the AWS resource to query recommendations for |
region | string | AWS region (default: us-east-1) |
checkArn | string | The AWS Trusted Advisor Check ARN that relates to the Recommendation |
language | string | The ISO 639-1 code for the language that you want your recommendations to appear in. |
maxResults | integer | The maximum number of results to return per page |
nextToken | string | The 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. |
pillar | string | The pillar that the recommendation belongs to |
status | string | The current status of the Recommendation Resource |
SELECT examples
- list_recommendations_for_resource
List all Trusted Advisor recommendations for a given AWS resource ARN.
SELECT
aws_resource_arn,
check_arn,
exclusion_status,
last_updated_at,
metadata,
pillars,
recommendation_arn,
status
FROM aws.trustedadvisor.recommendations_for_resources
WHERE aws_resource_arn = '{{ aws_resource_arn }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND pillar = '{{ pillar }}'
AND status = '{{ status }}'
AND checkArn = '{{ checkArn }}'
AND language = '{{ language }}'
;