startMonitoringMembers method

Future<StartMonitoringMembersResponse> startMonitoringMembers({
  1. required List<String> accountIds,
  2. required String detectorId,
})

Turns on GuardDuty monitoring of the specified member accounts. Use this operation to restart monitoring of accounts that you stopped monitoring with the StopMonitoringMembers operation.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter accountIds : A list of account IDs of the GuardDuty member accounts to start monitoring.

Parameter detectorId : The unique ID of the detector of the GuardDuty administrator account associated with the member accounts to monitor.

Implementation

Future<StartMonitoringMembersResponse> startMonitoringMembers({
  required List<String> accountIds,
  required String detectorId,
}) async {
  ArgumentError.checkNotNull(accountIds, 'accountIds');
  ArgumentError.checkNotNull(detectorId, 'detectorId');
  _s.validateStringLength(
    'detectorId',
    detectorId,
    1,
    300,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'accountIds': accountIds,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/detector/${Uri.encodeComponent(detectorId)}/member/start',
    exceptionFnMap: _exceptionFns,
  );
  return StartMonitoringMembersResponse.fromJson(response);
}