ListRecommendationResources
List Resources of a Recommendation. This API provides global recommendations, eliminating the need to call the API in each AWS Region.
Request Syntax
GET /v1/recommendations/recommendationIdentifier
/resources?exclusionStatus=exclusionStatus
&maxResults=maxResults
&nextToken=nextToken
®ionCode=regionCode
&status=status
HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- exclusionStatus
-
The exclusion status of the resource
Valid Values:
excluded | included
- 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.
- recommendationIdentifier
-
The Recommendation identifier
Length Constraints: Minimum length of 20. Maximum length of 200.
Pattern:
^arn:[\w-]+:trustedadvisor::\d{12}:recommendation\/[\w-]+$
Required: Yes
- regionCode
-
The AWS Region code of the resource
- status
-
The status of the resource
Valid Values:
ok | warning | error
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"nextToken": "string",
"recommendationResourceSummaries": [
{
"arn": "string",
"awsResourceId": "string",
"exclusionStatus": "string",
"id": "string",
"lastUpdatedAt": "string",
"metadata": {
"string" : "string"
},
"recommendationArn": "string",
"regionCode": "string",
"status": "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.
- recommendationResourceSummaries
-
A list of Recommendation Resources
Type: Array of RecommendationResourceSummary 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
- ResourceNotFoundException
-
Exception that the requested resource has not been found
HTTP Status Code: 404
- 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 Recommendation Resources
List all resources for a recommendation by its identifier.
Sample Request
{
"recommendationIdentifier": "arn:aws:trustedadvisor::000000000000:recommendation/55fa4d2e-bbb7-491a-833b-5773e9589578"
}
Sample Response
{
"recommendationResourceSummaries": [
{
"arn": "arn:aws:trustedadvisor::000000000000:recommendation-resource/55fa4d2e-bbb7-491a-833b-5773e9589578/18959a1f1973cff8e706e9d9bde28bba36cd602a6b2cb86c8b61252835236010",
"id": "18959a1f1973cff8e706e9d9bde28bba36cd602a6b2cb86c8b61252835236010",
"awsResourceId": "webcms-dev-01",
"lastUpdatedAt": "2023-11-01T15:09:51.891Z",
"metadata": {
"0": "14",
"1": "123.12000000000002",
"2": "webcms-dev-01",
"3": "db.m6i.large",
"4": "false",
"5": "us-east-1",
"6": "arn:aws:rds:us-east-1:000000000000:db:webcms-dev-01",
"7": "20"
},
"recommendationArn": "arn:aws:trustedadvisor::000000000000:recommendation/55fa4d2e-bbb7-491a-833b-5773e9589578",
"regionCode": "us-east-1",
"exclusionStatus": "included",
"status": "warning"
},
{
"arn": "arn:aws:trustedadvisor::000000000000:recommendation-resource/55fa4d2e-bbb7-491a-833b-5773e9589578/e6367ff500ac90db8e4adeb4892e39ee9c36bbf812dcbce4b9e4fefcec9eb63e",
"id": "e6367ff500ac90db8e4adeb4892e39ee9c36bbf812dcbce4b9e4fefcec9eb63e",
"awsResourceId": "aws-dev-db-stack-instance-1",
"lastUpdatedAt": "2023-11-01T15:09:51.891Z",
"metadata": {
"0": "14",
"1": "29.52",
"2": "aws-dev-db-stack-instance-1",
"3": "db.t2.small",
"4": "false",
"5": "us-east-1",
"6": "arn:aws:rds:us-east-1:000000000000:db:aws-dev-db-stack-instance-1",
"7": "1"
},
"recommendationArn": "arn:aws:trustedadvisor::000000000000:recommendation/55fa4d2e-bbb7-491a-833b-5773e9589578",
"regionCode": "us-east-1",
"exclusionStatus": "included",
"status": "warning"
},
{
"arn": "arn:aws:trustedadvisor::000000000000:recommendation-resource/55fa4d2e-bbb7-491a-833b-5773e9589578/31aa78ba050a5015d2d38cca7f5f1ce88f70857c4e1c3ad03f8f9fd95dad7459",
"id": "31aa78ba050a5015d2d38cca7f5f1ce88f70857c4e1c3ad03f8f9fd95dad7459",
"awsResourceId": "aws-awesome-apps-stack-db",
"lastUpdatedAt": "2023-11-01T15:09:51.891Z",
"metadata": {
"0": "14",
"1": "114.48000000000002",
"2": "aws-awesome-apps-stack-db",
"3": "db.m6g.large",
"4": "false",
"5": "us-east-1",
"6": "arn:aws:rds:us-east-1:000000000000:db:aws-awesome-apps-stack-db",
"7": "100"
},
"recommendationArn": "arn:aws:trustedadvisor::000000000000:recommendation/55fa4d2e-bbb7-491a-833b-5773e9589578",
"regionCode": "us-east-1",
"exclusionStatus": "included",
"status": "warning"
}
],
"nextToken": "REDACTED"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: