Skip to content

list_organization_recommendation_resources

list_organization_recommendation_resources(
    organization_recommendation_identifier: OrganizationRecommendationIdentifier,
    *,
    config_overrides: Optional[TrustedAdvisorClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
    status: Optional[ResourceStatus] = None,
    exclusion_status: Optional[ExclusionStatus] = None,
    region_code: Optional[str] = None,
    affected_account_id: Optional[AccountId] = None,
) -> ListOrganizationRecommendationResourcesResponse

List Resources of a Recommendation within an Organization. This API only supports prioritized recommendations and provides global priority recommendations, eliminating the need to call the API in each AWS Region.

Parameters:

  • next_token (Optional[str], default: None ) –

    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.

  • max_results (Optional[int], default: None ) –

    The maximum number of results to return per page.

  • status (Optional[ResourceStatus], default: None ) –

    The status of the resource

  • exclusion_status (Optional[ExclusionStatus], default: None ) –

    The exclusion status of the resource

  • region_code (Optional[str], default: None ) –

    The AWS Region code of the resource

  • organization_recommendation_identifier (OrganizationRecommendationIdentifier) –

    The AWS Organization organization's Recommendation identifier

  • affected_account_id (Optional[AccountId], default: None ) –

    An account affected by this organization recommendation

Raises:

Examples:

List all Resources for an AWS Organization's Recommendation

>>> client.list_organization_recommendation_resources(organization_recommendation_identifier='arn:aws:trustedadvisor:::organization-recommendation/5a694939-2e54-45a2-ae72-730598fa89d0')
Source code in docs_src/capo_trustedadvisor/_services/trusted_advisor.py
def list_organization_recommendation_resources(
    self,
    organization_recommendation_identifier: "capo_trustedadvisor.types.organization_recommendation_identifier.OrganizationRecommendationIdentifier",
    *,
    config_overrides: Optional[TrustedAdvisorClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[int] = None,
    status: Optional[
        "capo_trustedadvisor.types.resource_status.ResourceStatus"
    ] = None,
    exclusion_status: Optional[
        "capo_trustedadvisor.types.exclusion_status.ExclusionStatus"
    ] = None,
    region_code: Optional[str] = None,
    affected_account_id: Optional[
        "capo_trustedadvisor.types.account_id.AccountId"
    ] = None,
) -> "capo_trustedadvisor.types.list_organization_recommendation_resources_response.ListOrganizationRecommendationResourcesResponse":
    """<p>List Resources of a Recommendation within an Organization. This API only supports prioritized recommendations and provides global priority recommendations, eliminating the need to call the API in each AWS Region. </p>

    Args:
        next_token: <p>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. </p>
        max_results: <p>The maximum number of results to return per page.</p>
        status: <p>The status of the resource</p>
        exclusion_status: <p>The exclusion status of the resource</p>
        region_code: <p>The AWS Region code of the resource</p>
        organization_recommendation_identifier: <p>The AWS Organization organization's Recommendation identifier</p>
        affected_account_id: <p>An account affected by this organization recommendation</p>

    Raises:
        capo_trustedadvisor.errors.access_denied_exception.AccessDeniedException: <p>Exception that access has been denied due to insufficient access</p>
        capo_trustedadvisor.errors.internal_server_exception.InternalServerException: <p>Exception to notify that an unexpected internal error occurred during processing of the request</p>
        capo_trustedadvisor.errors.resource_not_found_exception.ResourceNotFoundException: <p>Exception that the requested resource has not been found</p>
        capo_trustedadvisor.errors.throttling_exception.ThrottlingException: <p>Exception to notify that requests are being throttled</p>
        capo_trustedadvisor.errors.validation_exception.ValidationException: <p>Exception that the request failed to satisfy service constraints</p>
        capo_trustedadvisor.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List all Resources for an AWS Organization's Recommendation

        >>> client.list_organization_recommendation_resources(organization_recommendation_identifier='arn:aws:trustedadvisor:::organization-recommendation/5a694939-2e54-45a2-ae72-730598fa89d0')
    """

    def _handler(
        req: "OperationRequest[capo_trustedadvisor.types.list_organization_recommendation_resources_request.ListOrganizationRecommendationResourcesRequest]",
    ) -> OperationResponse[
        "capo_trustedadvisor.types.list_organization_recommendation_resources_response.ListOrganizationRecommendationResourcesResponse"
    ]:
        import capo_trustedadvisor._operations.trusted_advisor.list_organization_recommendation_resources

        output, http_response = (
            capo_trustedadvisor._operations.trusted_advisor.list_organization_recommendation_resources.list_organization_recommendation_resources(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListOrganizationRecommendationResources"),
    )
    input_: capo_trustedadvisor.types.list_organization_recommendation_resources_request.ListOrganizationRecommendationResourcesRequest = {
        "organization_recommendation_identifier": organization_recommendation_identifier
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if status is not None:
        input_["status"] = status
    if exclusion_status is not None:
        input_["exclusion_status"] = exclusion_status
    if region_code is not None:
        input_["region_code"] = region_code
    if affected_account_id is not None:
        input_["affected_account_id"] = affected_account_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output