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.

With autoEnableOrganizationMembers configuration for your organization set to ALL, you'll receive an error if you attempt to stop monitoring the member accounts in your organization.

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.

To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

Implementation

Future<StopMonitoringMembersResponse> stopMonitoringMembers({
  required List<String> accountIds,
  required String detectorId,
}) async {
  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);
}