Skip to content

batch_update_recommendation_resource_exclusion

batch_update_recommendation_resource_exclusion(
    recommendation_resource_exclusions: RecommendationResourceExclusionList,
    *,
    config_overrides: Optional[TrustedAdvisorClientConfig] = None,
) -> BatchUpdateRecommendationResourceExclusionResponse

Update one or more exclusion statuses for a list of recommendation resources. This API supports up to 25 unique recommendation resource ARNs per request. This API currently doesn't support prioritized recommendation resources. This API updates global recommendations, eliminating the need to call the API in each AWS Region. After submitting an exclusion update, note that it might take a few minutes for the changes to be reflected in the system.

Parameters:

Raises:

Examples:

Batch updates the exclusion status for a list of recommendation resources

>>> client.batch_update_recommendation_resource_exclusion(recommendation_resource_exclusions=[{'arn': 'arn:aws:trustedadvisor::000000000000:recommendation-resource/55fa4d2e-bbb7-491a-833b-5773e9589578/18959a1f1973cff8e706e9d9bde28bba36cd602a6b2cb86c8b61252835236010', 'isExcluded': True}])
Source code in docs_src/capo_trustedadvisor/_services/trusted_advisor.py
def batch_update_recommendation_resource_exclusion(
    self,
    recommendation_resource_exclusions: "capo_trustedadvisor.types.recommendation_resource_exclusion_list.RecommendationResourceExclusionList",
    *,
    config_overrides: Optional[TrustedAdvisorClientConfig] = None,
) -> "capo_trustedadvisor.types.batch_update_recommendation_resource_exclusion_response.BatchUpdateRecommendationResourceExclusionResponse":
    """<p>Update one or more exclusion statuses for a list of recommendation resources. This API supports up to 25 unique recommendation resource ARNs per request. This API currently doesn't support prioritized recommendation resources. This API updates global recommendations, eliminating the need to call the API in each AWS Region. After submitting an exclusion update, note that it might take a few minutes for the changes to be reflected in the system.</p>

    Args:
        recommendation_resource_exclusions: <p>A list of recommendation resource ARNs and exclusion status to update</p>

    Raises:
        capo_trustedadvisor.errors.access_denied_exception.AccessDeniedException: <p>Exception that access has been denied due to insufficient access</p>
        capo_trustedadvisor.errors.conflict_exception.ConflictException: <p>Exception that the request was denied due to conflictions in state</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.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:
        Batch updates the exclusion status for a list of recommendation resources

        >>> client.batch_update_recommendation_resource_exclusion(recommendation_resource_exclusions=[{'arn': 'arn:aws:trustedadvisor::000000000000:recommendation-resource/55fa4d2e-bbb7-491a-833b-5773e9589578/18959a1f1973cff8e706e9d9bde28bba36cd602a6b2cb86c8b61252835236010', 'isExcluded': True}])
    """

    def _handler(
        req: "OperationRequest[capo_trustedadvisor.types.batch_update_recommendation_resource_exclusion_request.BatchUpdateRecommendationResourceExclusionRequest]",
    ) -> OperationResponse[
        "capo_trustedadvisor.types.batch_update_recommendation_resource_exclusion_response.BatchUpdateRecommendationResourceExclusionResponse"
    ]:
        import capo_trustedadvisor._operations.trusted_advisor.batch_update_recommendation_resource_exclusion

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("BatchUpdateRecommendationResourceExclusion"),
    )
    input_: capo_trustedadvisor.types.batch_update_recommendation_resource_exclusion_request.BatchUpdateRecommendationResourceExclusionRequest = {
        "recommendation_resource_exclusions": recommendation_resource_exclusions
    }

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