listGraphs method

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

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

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

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,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    1024,
  );
  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);
}