BatchUpdateRecommendationResourceExclusion - AWS Trusted Advisor

BatchUpdateRecommendationResourceExclusion

Update one or more exclusion status 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.

Request Syntax

PUT /v1/batch-update-recommendation-resource-exclusion HTTP/1.1 Content-type: application/json { "recommendationResourceExclusions": [ { "arn": "string", "isExcluded": boolean } ] }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

recommendationResourceExclusions

A list of recommendation resource ARNs and exclusion status to update

Type: Array of RecommendationResourceExclusion objects

Array Members: Minimum number of 1 item. Maximum number of 25 items.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "batchUpdateRecommendationResourceExclusionErrors": [ { "arn": "string", "errorCode": "string", "errorMessage": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

batchUpdateRecommendationResourceExclusionErrors

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

Type: Array of UpdateRecommendationResourceExclusionError objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

Exception that access has been denied due to insufficient access

HTTP Status Code: 403

ConflictException

Exception that the request was denied due to conflictions in state

HTTP Status Code: 409

InternalServerException

Exception to notify that an unexpected internal error occurred during processing of the request

HTTP Status Code: 500

ThrottlingException

Exception to notify that requests are being throttled

HTTP Status Code: 429

ValidationException

Exception that the request failed to satisfy service constraints

HTTP Status Code: 400

Examples

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

Batch update one or more exclusion status for a list of recommendation resources

Sample Request

{ "recommendationResourceExclusions": [ { "arn": "arn:aws:trustedadvisor::000000000000:recommendation-resource/55fa4d2e-bbb7-491a-833b-5773e9589578/18959a1f1973cff8e706e9d9bde28bba36cd602a6b2cb86c8b61252835236010", "isExcluded": true } ] }

Sample Response

{ "batchUpdateRecommendationResourceExclusionErrors": [ { "arn": "arn:aws:trustedadvisor::000000000000:recommendation-resource/55fa4d2e-bbb7-491a-833b-5773e9589578/18959a1f1973cff8e706e9d9bde28bba36cd602a6b2cb86c8b61252835236010", "errorCode": "404", "errorMessage": "Exception that the requested resource has not been found" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: