enable method

Future<EnableResponse> enable({
  1. required List<ResourceScanType> resourceTypes,
  2. List<String>? accountIds,
  3. String? clientToken,
})

Enables Amazon Inspector scans for one or more Amazon Web Services accounts.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceTypes : The resource scan types you want to enable.

Parameter accountIds : A list of account IDs you want to enable Amazon Inspector scans for.

Parameter clientToken : The idempotency token for the request.

Implementation

Future<EnableResponse> enable({
  required List<ResourceScanType> resourceTypes,
  List<String>? accountIds,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'resourceTypes': resourceTypes.map((e) => e.value).toList(),
    if (accountIds != null) 'accountIds': accountIds,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/enable',
    exceptionFnMap: _exceptionFns,
  );
  return EnableResponse.fromJson(response);
}