ListRecommendations - AWS Trusted Advisor

ListRecommendations

List a filterable set of Recommendations. This API provides global recommendations, eliminating the need to call the API in each AWS Region.

Request Syntax

GET /v1/recommendations?afterLastUpdatedAt=afterLastUpdatedAt&awsService=awsService&beforeLastUpdatedAt=beforeLastUpdatedAt&checkIdentifier=checkIdentifier&maxResults=maxResults&nextToken=nextToken&pillar=pillar&source=source&status=status&type=type HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

afterLastUpdatedAt

After the last update of the Recommendation

awsService

The aws service associated with the Recommendation

Length Constraints: Minimum length of 2. Maximum length of 30.

beforeLastUpdatedAt

Before the last update of the Recommendation

checkIdentifier

The check identifier of the Recommendation

Length Constraints: Minimum length of 20. Maximum length of 64.

Pattern: ^arn:[\w-]+:trustedadvisor:::check\/[\w-]+$

maxResults

The maximum number of results to return per page.

Valid Range: Minimum value of 1. Maximum value of 200.

nextToken

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.

Length Constraints: Minimum length of 4. Maximum length of 10000.

pillar

The pillar of the Recommendation

Valid Values: cost_optimizing | performance | security | service_limits | fault_tolerance | operational_excellence

source

The source of the Recommendation

Valid Values: aws_config | compute_optimizer | cost_explorer | lse | manual | pse | rds | resilience | resilience_hub | security_hub | stir | ta_check | well_architected

status

The status of the Recommendation

Valid Values: ok | warning | error

type

The type of the Recommendation

Valid Values: standard | priority

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "recommendationSummaries": [ { "arn": "string", "awsServices": [ "string" ], "checkArn": "string", "createdAt": "string", "id": "string", "lastUpdatedAt": "string", "lifecycleStage": "string", "name": "string", "pillars": [ "string" ], "pillarSpecificAggregates": { "costOptimizing": { "estimatedMonthlySavings": number, "estimatedPercentMonthlySavings": number } }, "resourcesAggregates": { "errorCount": number, "okCount": number, "warningCount": number }, "source": "string", "status": "string", "type": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken

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.

Type: String

Length Constraints: Minimum length of 4. Maximum length of 10000.

recommendationSummaries

The list of Recommendations

Type: Array of RecommendationSummary objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

Exception that access has been denied due to insufficient access

HTTP Status Code: 403

InternalServerException

Exception to notify that an unexpected internal error occurred during processing of the request

HTTP Status Code: 500

ThrottlingException

Exception to notify that requests are being throttled

HTTP Status Code: 429

ValidationException

Exception that the request failed to satisfy service constraints

HTTP Status Code: 400

Examples

List All Recommendations

List all recommendations and do not include a filter.

Sample Response

{ "recommendationSummaries": [ { "arn": "arn:aws:trustedadvisor::000000000000:recommendation/55fa4d2e-bbb7-491a-833b-5773e9589578", "name": "MFA Recommendation", "awsServices": [ "iam" ], "checkArn": "arn:aws:trustedadvisor:::check/7DAFEmoDos", "id": "55fa4d2e-bbb7-491a-833b-5773e9589578", "lastUpdatedAt": "2023-11-01T15:57:58.673Z", "pillarSpecificAggregates": { "costOptimizing": { "estimatedMonthlySavings": 0.0, "estimatedPercentMonthlySavings": 0.0 } }, "pillars": [ "security" ], "resourcesAggregates": { "errorCount": 1, "okCount": 0, "warningCount": 0 }, "source": "ta_check", "status": "error", "type": "standard" }, { "arn": "arn:aws:trustedadvisor::000000000000:recommendation/8b602b6f-452d-4cb2-8a9e-c7650955d9cd", "name": "RDS clusters quota warning", "awsServices": [ "rds" ], "checkArn": "arn:aws:trustedadvisor:::check/gjqMBn6pjz", "id": "8b602b6f-452d-4cb2-8a9e-c7650955d9cd", "lastUpdatedAt": "2023-11-01T15:58:17.397Z", "pillarSpecificAggregates": { "costOptimizing": { "estimatedMonthlySavings": 0.0, "estimatedPercentMonthlySavings": 0.0 } }, "pillars": [ "service_limits" ], "resourcesAggregates": { "errorCount": 0, "okCount": 3, "warningCount": 6 }, "source": "ta_check", "status": "warning", "type": "standard" } ], "nextToken": "REDACTED" }

List Recommendations With Filter

Filter and return a max of one Recommendation that regards AWS IAM.

Sample Request

{ "awsService": "iam", "maxResults": 100 }

Sample Response

{ "recommendationSummaries": [{ "arn": "arn:aws:trustedadvisor::000000000000:recommendation/55fa4d2e-bbb7-491a-833b-5773e9589578", "name": "MFA Recommendation", "awsServices": [ "iam" ], "checkArn": "arn:aws:trustedadvisor:::check/7DAFEmoDos", "id": "55fa4d2e-bbb7-491a-833b-5773e9589578", "lastUpdatedAt": "2023-11-01T15:57:58.673Z", "pillarSpecificAggregates": { "costOptimizing": { "estimatedMonthlySavings": 0.0, "estimatedPercentMonthlySavings": 0.0 } }, "pillars": [ "security" ], "resourcesAggregates": { "errorCount": 1, "okCount": 0, "warningCount": 0 }, "source": "ta_check", "status": "error", "type": "standard" }], "nextToken": "REDACTED" }

Fetch The Next Page Of A Previous Request

Use the "nextToken" returned from a previous request to fetch the next page of filtered Recommendations.

Sample Request

{ "nextToken": "REDACTED", "awsService": "rds", "maxResults": 100 }

Sample Response

{ "recommendationSummaries": [{ "arn": "arn:aws:trustedadvisor::000000000000:recommendation/8b602b6f-452d-4cb2-8a9e-c7650955d9cd", "name": "RDS clusters quota warning", "awsServices": [ "rds" ], "checkArn": "arn:aws:trustedadvisor:::check/gjqMBn6pjz", "id": "8b602b6f-452d-4cb2-8a9e-c7650955d9cd", "lastUpdatedAt": "2023-11-01T15:58:17.397Z", "pillarSpecificAggregates": { "costOptimizing": { "estimatedMonthlySavings": 0.0, "estimatedPercentMonthlySavings": 0.0 } }, "pillars": [ "service_limits" ], "resourcesAggregates": { "errorCount": 0, "okCount": 3, "warningCount": 6 }, "source": "ta_check", "status": "warning", "type": "standard" }] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: