listGraphs method

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

Returns the list of behavior graphs that the calling account is an administrator account of. This operation can only be called by an administrator account.

Because an account can currently only be the administrator of one behavior graph within a Region, the results always contain a single behavior graph.

May throw AccessDeniedException. May throw InternalServerException. May throw ValidationException.

Parameter maxResults : The maximum number of graphs to return at a time. 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 get the next page of results, the pagination token that was returned with the previous set of results. The initial request does not include a pagination token.

Implementation

Future<ListGraphsResponse> listGraphs({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    200,
  );
  final $payload = <String, dynamic>{
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/graphs/list',
    exceptionFnMap: _exceptionFns,
  );
  return ListGraphsResponse.fromJson(response);
}