listMembers method

Future<ListMembersResponse> listMembers({
  1. required String graphArn,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves the list of member accounts for a behavior graph. Does not return member accounts that were removed from the behavior graph.

May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter graphArn : The ARN of the behavior graph for which to retrieve the list of member accounts.

Parameter maxResults : The maximum number of member accounts to include in the response. The total must be less than the overall limit on the number of results to return, which is currently 200.

Parameter nextToken : For requests to retrieve the next page of member account results, the pagination token that was returned with the previous page of results. The initial request does not include a pagination token.

Implementation

Future<ListMembersResponse> listMembers({
  required String graphArn,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(graphArn, 'graphArn');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    200,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1024,
  );
  final $payload = <String, dynamic>{
    'GraphArn': graphArn,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/graph/members/list',
    exceptionFnMap: _exceptionFns,
  );
  return ListMembersResponse.fromJson(response);
}