CmdID

CmdID / aws / aws trustedadvisor

aws trustedadvisor list-organization-recommendations

List a filterable set of Recommendations within an Organization. AWS CLI reference

3 examples 10 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

Example 1: To list organization recommendations

The following list-organization-recommendations example lists all organization recommendations and does not include a filter.

aws trustedadvisor list-organization-recommendationsIdentify
Its output, shortened
{
    "organizationRecommendationSummaries": [
        {
            "arn": "arn:aws:trustedadvisor:::organization-recommendation/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "name": "Lambda Runtime Deprecation Warning",
            "awsServices": [
                "lambda"
            ],
            "checkArn": "arn:aws:trustedadvisor:::check/L4dfs2Q4C5",
            "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "lifecycleStage": "resolved",
            "pillars": [
                "security"
            ],
            "resourcesAggregates": {
                "errorCount": 0,
                "okCount": 0,
                "warningCount": 0
            },
            "source": "ta_check",
            "status": "warning",
            "type": "priority"
        },
        {
            "arn": "arn:aws:trustedadvisor:::organization-recommendation/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
            "name": "Lambda Runtime Deprecation Warning",
            "awsServices": [
                "lambda"
            ],
            "checkArn": "arn:aws:trustedadvisor:::check/L4dfs2Q4C5",
… 17 more lines

For more information, see Get started with the Trusted Advisor API in the AWS Trusted Advisor User Guide.

Example 2: To list organization recommendations with a filter

The following list-organization-recommendations example filters and returns a max of one organization recommendation that is a part of the "security" pillar.

aws trustedadvisor list-organization-recommendations --pillar security --max-items 100Identify
--pillarThe pillar of the Recommendation
Its output
{
    "organizationRecommendationSummaries": [{
        "arn": "arn:aws:trustedadvisor:::organization-recommendation/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "name": "Lambda Runtime Deprecation Warning",
        "awsServices": [
            "lambda"
        ],
        "checkArn": "arn:aws:trustedadvisor:::check/L4dfs2Q4C5",
        "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "lifecycleStage": "resolved",
        "pillars": [
            "security"
        ],
        "resourcesAggregates": {
            "errorCount": 0,
            "okCount": 0,
            "warningCount": 0
        },
        "source": "ta_check",
        "status": "warning",
        "type": "priority"
    }],
    "nextToken": "REDACTED"
}

For more information, see Get started with the Trusted Advisor API in the AWS Trusted Advisor User Guide.

Example 3: To list organization recommendations with a pagination token

The following list-organization-recommendations example uses the "nextToken" returned from a previous request to fetch the next page of organization recommendations.

aws trustedadvisor list-organization-recommendations --pillar security --max-items 100 --starting-token <next-token>Identify
--pillarThe pillar of the Recommendation
Its output
{
    "organizationRecommendationSummaries": [{
        "arn": "arn:aws:trustedadvisor:::organization-recommendation/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
        "name": "Lambda Runtime Deprecation Warning",
        "awsServices": [
            "lambda"
        ],
        "checkArn": "arn:aws:trustedadvisor:::check/L4dfs2Q4C5",
        "id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
        "lifecycleStage": "resolved",
        "pillars": [
            "security"
        ],
        "resourcesAggregates": {
            "errorCount": 0,
            "okCount": 0,
            "warningCount": 0
        },
        "source": "ta_check",
        "status": "warning",
        "type": "priority"
    }]
}

For more information, see Get started with the Trusted Advisor API in the AWS Trusted Advisor User Guide.

Options

10 in the AWS CLI reference
--after-last-updated-atAfter the last update of the Recommendation
--aws-serviceThe aws service associated with the Recommendation
--before-last-updated-atBefore the last update of the Recommendation
--check-identifierThe check identifier of the Recommendation
--max-resultsThe maximum number of results to return per page.
--next-tokenThe token for the next set of results.
--pillarThe pillar of the Recommendation
--sourceThe source of the Recommendation
--statusThe status of the Recommendation
--typeThe type of the Recommendation