createCisScanConfiguration method
Creates a CIS scan configuration.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter scanName :
The scan name for the CIS scan configuration.
Parameter schedule :
The schedule for the CIS scan configuration.
Parameter securityLevel :
The security level for the CIS scan configuration. Security level refers
to the Benchmark levels that CIS assigns to a profile.
Parameter targets :
The targets for the CIS scan configuration.
Parameter tags :
The tags for the CIS scan configuration.
Implementation
Future<CreateCisScanConfigurationResponse> createCisScanConfiguration({
required String scanName,
required Schedule schedule,
required CisSecurityLevel securityLevel,
required CreateCisTargets targets,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'scanName': scanName,
'schedule': schedule,
'securityLevel': securityLevel.value,
'targets': targets,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/cis/scan-configuration/create',
exceptionFnMap: _exceptionFns,
);
return CreateCisScanConfigurationResponse.fromJson(response);
}