createExclusionsPreview method
Future<CreateExclusionsPreviewResponse>
createExclusionsPreview({
- required String assessmentTemplateArn,
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.
May throw InvalidInputException. May throw PreviewGenerationInProgressException. May throw InternalException. May throw AccessDeniedException. May throw NoSuchEntityException. May throw ServiceTemporarilyUnavailableException.
Parameter assessmentTemplateArn
:
The ARN that specifies the assessment template for which you want to
create an exclusions preview.
Implementation
Future<CreateExclusionsPreviewResponse> createExclusionsPreview({
required String assessmentTemplateArn,
}) async {
ArgumentError.checkNotNull(assessmentTemplateArn, 'assessmentTemplateArn');
_s.validateStringLength(
'assessmentTemplateArn',
assessmentTemplateArn,
1,
300,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'InspectorService.CreateExclusionsPreview'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'assessmentTemplateArn': assessmentTemplateArn,
},
);
return CreateExclusionsPreviewResponse.fromJson(jsonResponse.body);
}