listMemberAccounts method

Future<ListMemberAccountsResult> listMemberAccounts({
  1. int? maxResults,
  2. String? nextToken,
})

Lists all Amazon Macie Classic member accounts for the current Amazon Macie Classic master account.

May throw InternalException. May throw InvalidInputException.

Parameter maxResults : Use this parameter to indicate the maximum number of items that you want in the response. The default value is 250.

Parameter nextToken : Use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListMemberAccounts action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.

Implementation

Future<ListMemberAccountsResult> listMemberAccounts({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    250,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    500,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'MacieService.ListMemberAccounts'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return ListMemberAccountsResult.fromJson(jsonResponse.body);
}