stopMonitoringMembers method

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

Stops GuardDuty monitoring for the specified member accounts. Use the StartMonitoringMembers operation to restart monitoring for those accounts.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter accountIds : A list of account IDs for the member accounts to stop monitoring.

Parameter detectorId : The unique ID of the detector associated with the GuardDuty administrator account that is monitoring member accounts.

Implementation

Future<StopMonitoringMembersResponse> stopMonitoringMembers({
  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/stop',
    exceptionFnMap: _exceptionFns,
  );
  return StopMonitoringMembersResponse.fromJson(response);
}