Starts the generation of an exclusions preview for the specified assessment template. The exclusions preview lists the potential exclusions (ExclusionPreview) that Inspector can detect before it runs the assessment.
Parameters:
-
assessment_template_arn
(Arn)
–
The ARN that specifies the assessment template for which you want to create an exclusions preview.
Raises:
Source code in docs_src/capo_inspector/_services/inspector.py
| def create_exclusions_preview(
self,
assessment_template_arn: "capo_inspector.types.arn.Arn",
*,
config_overrides: Optional[InspectorClientConfig] = None,
) -> "capo_inspector.types.create_exclusions_preview_response.CreateExclusionsPreviewResponse":
"""<p>Starts the generation of an exclusions preview for the specified assessment template. The exclusions preview lists the potential exclusions (ExclusionPreview) that Inspector can detect before it runs the assessment. </p>
Args:
assessment_template_arn: <p>The ARN that specifies the assessment template for which you want to create an exclusions preview.</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.preview_generation_in_progress_exception.PreviewGenerationInProgressException: <p>The request is rejected. The specified assessment template is currently generating an exclusions preview.</p>
capo_inspector.errors.service_temporarily_unavailable_exception.ServiceTemporarilyUnavailableException: <p>The serice is temporary unavailable.</p>
capo_inspector.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_inspector.types.create_exclusions_preview_request.CreateExclusionsPreviewRequest]",
) -> OperationResponse[
"capo_inspector.types.create_exclusions_preview_response.CreateExclusionsPreviewResponse"
]:
import capo_inspector._operations.inspector_service.create_exclusions_preview
output, http_response = (
capo_inspector._operations.inspector_service.create_exclusions_preview.create_exclusions_preview(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateExclusionsPreview")
)
input_: capo_inspector.types.create_exclusions_preview_request.CreateExclusionsPreviewRequest = {
"assessment_template_arn": assessment_template_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|