getMembers method
Retrieves GuardDuty member accounts (of the current GuardDuty administrator account) specified by the account IDs.
May throw BadRequestException. May throw InternalServerErrorException.
Parameter accountIds
:
A list of account IDs of the GuardDuty member accounts that you want to
describe.
Parameter detectorId
:
The unique ID of the detector of the GuardDuty account whose members you
want to retrieve.
Implementation
Future<GetMembersResponse> getMembers({
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/get',
exceptionFnMap: _exceptionFns,
);
return GetMembersResponse.fromJson(response);
}