startOnDemandAuditTask method

Future<StartOnDemandAuditTaskResponse> startOnDemandAuditTask({
  1. required List<String> targetCheckNames,
})

Starts an on-demand Device Defender audit.

May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException. May throw LimitExceededException.

Parameter targetCheckNames : Which checks are performed during the audit. The checks you specify must be enabled for your account or an exception occurs. Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or UpdateAccountAuditConfiguration to select which checks are enabled.

Implementation

Future<StartOnDemandAuditTaskResponse> startOnDemandAuditTask({
  required List<String> targetCheckNames,
}) async {
  ArgumentError.checkNotNull(targetCheckNames, 'targetCheckNames');
  final $payload = <String, dynamic>{
    'targetCheckNames': targetCheckNames,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/audit/tasks',
    exceptionFnMap: _exceptionFns,
  );
  return StartOnDemandAuditTaskResponse.fromJson(response);
}