listDatasourcePackages method

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

Lists data source packages in the behavior graph.

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

Parameter graphArn : The ARN of the behavior graph.

Parameter maxResults : The maximum number of results to return.

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<ListDatasourcePackagesResponse> listDatasourcePackages({
  required String graphArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    200,
  );
  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/datasources/list',
    exceptionFnMap: _exceptionFns,
  );
  return ListDatasourcePackagesResponse.fromJson(response);
}