Retrieves information about a finding recommendation for the specified analyzer.
Parameters:
-
analyzer_arn
(AnalyzerArn)
–
-
id
(str)
–
The unique ID for the finding recommendation.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of results to return in the response.
-
next_token
(Optional[Token], default:
None
)
–
A token used for pagination of results returned.
Raises:
Examples:
Successfully fetched finding recommendation
>>> client.get_finding_recommendation(analyzer_arn='arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a', id='finding-id', max_results=3, next_token='token')
In progress finding recommendation
>>> client.get_finding_recommendation(analyzer_arn='arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a', id='finding-id', max_results=3)
Failed finding recommendation
>>> client.get_finding_recommendation(analyzer_arn='arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a', id='finding-id', max_results=3)
Failed field validation for id value
>>> client.get_finding_recommendation(analyzer_arn='arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a', id='!')
Source code in docs_src/capo_accessanalyzer/_services/access_analyzer.py
| def get_finding_recommendation(
self,
analyzer_arn: "capo_accessanalyzer.types.analyzer_arn.AnalyzerArn",
id: str,
*,
config_overrides: Optional[AccessAnalyzerClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional["capo_accessanalyzer.types.token.Token"] = None,
) -> "capo_accessanalyzer.types.get_finding_recommendation_response.GetFindingRecommendationResponse":
"""<p>Retrieves information about a finding recommendation for the specified analyzer.</p>
Args:
analyzer_arn: <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources">ARN of the analyzer</a> used to generate the finding recommendation.</p>
id: <p>The unique ID for the finding recommendation.</p>
max_results: <p>The maximum number of results to return in the response.</p>
next_token: <p>A token used for pagination of results returned.</p>
Raises:
capo_accessanalyzer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_accessanalyzer.errors.internal_server_exception.InternalServerException: <p>Internal server error.</p>
capo_accessanalyzer.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found.</p>
capo_accessanalyzer.errors.throttling_exception.ThrottlingException: <p>Throttling limit exceeded error.</p>
capo_accessanalyzer.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
capo_accessanalyzer.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Successfully fetched finding recommendation
>>> client.get_finding_recommendation(analyzer_arn='arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a', id='finding-id', max_results=3, next_token='token')
In progress finding recommendation
>>> client.get_finding_recommendation(analyzer_arn='arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a', id='finding-id', max_results=3)
Failed finding recommendation
>>> client.get_finding_recommendation(analyzer_arn='arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a', id='finding-id', max_results=3)
Failed field validation for id value
>>> client.get_finding_recommendation(analyzer_arn='arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a', id='!')
"""
def _handler(
req: "OperationRequest[capo_accessanalyzer.types.get_finding_recommendation_request.GetFindingRecommendationRequest]",
) -> OperationResponse[
"capo_accessanalyzer.types.get_finding_recommendation_response.GetFindingRecommendationResponse"
]:
import capo_accessanalyzer._operations.access_analyzer.get_finding_recommendation
output, http_response = (
capo_accessanalyzer._operations.access_analyzer.get_finding_recommendation.get_finding_recommendation(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetFindingRecommendation")
)
input_: capo_accessanalyzer.types.get_finding_recommendation_request.GetFindingRecommendationRequest = {
"analyzer_arn": analyzer_arn,
"id": id,
}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|