Skip to content

get_organization_recommendation async

get_organization_recommendation(
    organization_recommendation_identifier: OrganizationRecommendationIdentifier,
    *,
    config_overrides: Optional[AsyncTrustedAdvisorClientConfig] = None,
) -> GetOrganizationRecommendationResponse

Get a specific recommendation within an AWS Organizations organization. This API supports only prioritized recommendations and provides global priority recommendations, eliminating the need to call the API in each AWS Region.

Parameters:

Raises:

Examples:

Get an AWS Organization's Recommendation by ARN

>>> await client.get_organization_recommendation(organization_recommendation_identifier='arn:aws:trustedadvisor:::organization-recommendation/9534ec9b-bf3a-44e8-8213-2ed68b39d9d5')
Source code in docs_src/capo_trustedadvisor/_services/async_trusted_advisor.py
async def get_organization_recommendation(
    self,
    organization_recommendation_identifier: "capo_trustedadvisor.types.organization_recommendation_identifier.OrganizationRecommendationIdentifier",
    *,
    config_overrides: Optional[AsyncTrustedAdvisorClientConfig] = None,
) -> "capo_trustedadvisor.types.get_organization_recommendation_response.GetOrganizationRecommendationResponse":
    """<p>Get a specific recommendation within an AWS Organizations organization. This API supports only prioritized recommendations and provides global priority recommendations, eliminating the need to call the API in each AWS Region. </p>

    Args:
        organization_recommendation_identifier: <p>The Recommendation identifier</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:
        Get an AWS Organization's Recommendation by ARN

        >>> await client.get_organization_recommendation(organization_recommendation_identifier='arn:aws:trustedadvisor:::organization-recommendation/9534ec9b-bf3a-44e8-8213-2ed68b39d9d5')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_trustedadvisor.types.get_organization_recommendation_request.GetOrganizationRecommendationRequest]",
    ) -> AsyncOperationResponse[
        "capo_trustedadvisor.types.get_organization_recommendation_response.GetOrganizationRecommendationResponse"
    ]:
        import capo_trustedadvisor._operations.trusted_advisor.get_organization_recommendation

        (
            output,
            http_response,
        ) = await capo_trustedadvisor._operations.trusted_advisor.get_organization_recommendation.async_get_organization_recommendation(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_trustedadvisor.types.get_organization_recommendation_response.GetOrganizationRecommendationResponse",
    ) -> dict[str, Any]:
        import capo_trustedadvisor.types.get_organization_recommendation_response

        return capo_trustedadvisor.types.get_organization_recommendation_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetOrganizationRecommendation", redact_output=_redact_output
        ),
    )
    input_: capo_trustedadvisor.types.get_organization_recommendation_request.GetOrganizationRecommendationRequest = {
        "organization_recommendation_identifier": organization_recommendation_identifier
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output