List exclusions that are generated by the assessment run.
Parameters:
-
assessment_run_arn
(Arn)
–
The ARN of the assessment run that generated the exclusions that you want to list.
-
next_token
(Optional[PaginationToken], default:
None
)
–
You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListExclusionsRequest action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.
-
max_results
(Optional[ListMaxResults], default:
None
)
–
You can use this parameter to indicate the maximum number of items you want in the response. The default value is 100. The maximum value is 500.
Raises:
Source code in docs_src/capo_inspector/_services/async_inspector.py
| async def list_exclusions(
self,
assessment_run_arn: "capo_inspector.types.arn.Arn",
*,
config_overrides: Optional[AsyncInspectorClientConfig] = None,
next_token: Optional[
"capo_inspector.types.pagination_token.PaginationToken"
] = None,
max_results: Optional[
"capo_inspector.types.list_max_results.ListMaxResults"
] = None,
) -> "capo_inspector.types.list_exclusions_response.ListExclusionsResponse":
"""<p>List exclusions that are generated by the assessment run.</p>
Args:
assessment_run_arn: <p>The ARN of the assessment run that generated the exclusions that you want to list.</p>
next_token: <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListExclusionsRequest action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.</p>
max_results: <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 100. The maximum value is 500.</p>
Raises:
capo_inspector.errors.access_denied_exception.AccessDeniedException: <p>You do not have required permissions to access the requested resource.</p>
capo_inspector.errors.internal_exception.InternalException: <p>Internal server error.</p>
capo_inspector.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
capo_inspector.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
capo_inspector.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_inspector.types.list_exclusions_request.ListExclusionsRequest]",
) -> AsyncOperationResponse[
"capo_inspector.types.list_exclusions_response.ListExclusionsResponse"
]:
import capo_inspector._operations.inspector_service.list_exclusions
(
output,
http_response,
) = await capo_inspector._operations.inspector_service.list_exclusions.async_list_exclusions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListExclusions")
)
input_: capo_inspector.types.list_exclusions_request.ListExclusionsRequest = {
"assessment_run_arn": assessment_run_arn
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|