TrustedAdvisor Public API

2024/04/29 - TrustedAdvisor Public API - 1 new2 updated api methods

Changes  This release adds the BatchUpdateRecommendationResourceExclusion API to support batch updates of Recommendation Resource exclusion statuses and introduces a new exclusion status filter to the ListRecommendationResources and ListOrganizationRecommendationResources APIs.

BatchUpdateRecommendationResourceExclusion (new) Link ¶

Update one or more exclusion status for a list of recommendation resources

See also: AWS API Documentation

Request Syntax

client.batch_update_recommendation_resource_exclusion(
    recommendationResourceExclusions=[
        {
            'arn': 'string',
            'isExcluded': True|False
        },
    ]
)
type recommendationResourceExclusions:

list

param recommendationResourceExclusions:

[REQUIRED]

A list of recommendation resource ARNs and exclusion status to update

  • (dict) --

    The request entry for Recommendation Resource exclusion. Each entry is a combination of Recommendation Resource ARN and corresponding exclusion status

    • arn (string) -- [REQUIRED]

      The ARN of the Recommendation Resource

    • isExcluded (boolean) -- [REQUIRED]

      The exclusion status

rtype:

dict

returns:

Response Syntax

{
    'batchUpdateRecommendationResourceExclusionErrors': [
        {
            'arn': 'string',
            'errorCode': 'string',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • batchUpdateRecommendationResourceExclusionErrors (list) --

      A list of recommendation resource ARNs whose exclusion status failed to update, if any

      • (dict) --

        The error entry for Recommendation Resource exclusion. Each entry is a combination of Recommendation Resource ARN, error code and error message

        • arn (string) --

          The ARN of the Recommendation Resource

        • errorCode (string) --

          The error code

        • errorMessage (string) --

          The error message

ListOrganizationRecommendationResources (updated) Link ¶
Changes (request, response)
Request
{'exclusionStatus': 'excluded | included'}
Response
{'organizationRecommendationResourceSummaries': {'exclusionStatus': 'excluded '
                                                                    '| '
                                                                    'included'}}

List Resources of a Recommendation within an Organization. This API only supports prioritized recommendations.

See also: AWS API Documentation

Request Syntax

client.list_organization_recommendation_resources(
    affectedAccountId='string',
    exclusionStatus='excluded'|'included',
    maxResults=123,
    nextToken='string',
    organizationRecommendationIdentifier='string',
    regionCode='string',
    status='ok'|'warning'|'error'
)
type affectedAccountId:

string

param affectedAccountId:

An account affected by this organization recommendation

type exclusionStatus:

string

param exclusionStatus:

The exclusion status of the resource

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type nextToken:

string

param 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 organizationRecommendationIdentifier:

string

param organizationRecommendationIdentifier:

[REQUIRED]

The AWS Organization organization's Recommendation identifier

type regionCode:

string

param regionCode:

The AWS Region code of the resource

type status:

string

param status:

The status of the resource

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'organizationRecommendationResourceSummaries': [
        {
            'accountId': 'string',
            'arn': 'string',
            'awsResourceId': 'string',
            'exclusionStatus': 'excluded'|'included',
            'id': 'string',
            'lastUpdatedAt': datetime(2015, 1, 1),
            'metadata': {
                'string': 'string'
            },
            'recommendationArn': 'string',
            'regionCode': 'string',
            'status': 'ok'|'warning'|'error'
        },
    ]
}

Response Structure

  • (dict) --

    • 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.

    • organizationRecommendationResourceSummaries (list) --

      A list of Recommendation Resources

      • (dict) --

        Organization Recommendation Resource Summary

        • accountId (string) --

          The AWS account ID

        • arn (string) --

          The ARN of the Recommendation Resource

        • awsResourceId (string) --

          The AWS resource identifier

        • exclusionStatus (string) --

          The exclusion status of the Recommendation Resource

        • id (string) --

          The ID of the Recommendation Resource

        • lastUpdatedAt (datetime) --

          When the Recommendation Resource was last updated

        • metadata (dict) --

          Metadata associated with the Recommendation Resource

          • (string) --

            • (string) --

        • recommendationArn (string) --

          The Recommendation ARN

        • regionCode (string) --

          The AWS Region code that the Recommendation Resource is in

        • status (string) --

          The current status of the Recommendation Resource

ListRecommendationResources (updated) Link ¶
Changes (request, response)
Request
{'exclusionStatus': 'excluded | included'}
Response
{'recommendationResourceSummaries': {'exclusionStatus': 'excluded | included'}}

List Resources of a Recommendation

See also: AWS API Documentation

Request Syntax

client.list_recommendation_resources(
    exclusionStatus='excluded'|'included',
    maxResults=123,
    nextToken='string',
    recommendationIdentifier='string',
    regionCode='string',
    status='ok'|'warning'|'error'
)
type exclusionStatus:

string

param exclusionStatus:

The exclusion status of the resource

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type nextToken:

string

param 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 recommendationIdentifier:

string

param recommendationIdentifier:

[REQUIRED]

The Recommendation identifier

type regionCode:

string

param regionCode:

The AWS Region code of the resource

type status:

string

param status:

The status of the resource

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'recommendationResourceSummaries': [
        {
            'arn': 'string',
            'awsResourceId': 'string',
            'exclusionStatus': 'excluded'|'included',
            'id': 'string',
            'lastUpdatedAt': datetime(2015, 1, 1),
            'metadata': {
                'string': 'string'
            },
            'recommendationArn': 'string',
            'regionCode': 'string',
            'status': 'ok'|'warning'|'error'
        },
    ]
}

Response Structure

  • (dict) --

    • 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.

    • recommendationResourceSummaries (list) --

      A list of Recommendation Resources

      • (dict) --

        Summary of a Recommendation Resource

        • arn (string) --

          The ARN of the Recommendation Resource

        • awsResourceId (string) --

          The AWS resource identifier

        • exclusionStatus (string) --

          The exclusion status of the Recommendation Resource

        • id (string) --

          The ID of the Recommendation Resource

        • lastUpdatedAt (datetime) --

          When the Recommendation Resource was last updated

        • metadata (dict) --

          Metadata associated with the Recommendation Resource

          • (string) --

            • (string) --

        • recommendationArn (string) --

          The Recommendation ARN

        • regionCode (string) --

          The AWS Region code that the Recommendation Resource is in

        • status (string) --

          The current status of the Recommendation Resource