queryGraph method

Future<QueryGraphOutput> queryGraph({
  1. required String domainIdentifier,
  2. required List<MatchClause> match,
  3. AdditionalAttributes? additionalAttributes,
  4. int? maxResults,
  5. String? nextToken,
})

Queries entities in the graph store.

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

Parameter domainIdentifier : The identifier of the Amazon DataZone domain.

Parameter match : List of query match clauses.

Parameter additionalAttributes : Additional details on the queried entity that can be requested in the response.

Parameter maxResults : The maximum number of entities to return in a single call to QueryGraph. When the number of entities to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to QueryGraph to list the next set of entities.

Parameter nextToken : When the number of entities is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of entities, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to QueryGraph to list the next set of entities.

Implementation

Future<QueryGraphOutput> queryGraph({
  required String domainIdentifier,
  required List<MatchClause> match,
  AdditionalAttributes? additionalAttributes,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final $payload = <String, dynamic>{
    'match': match,
    if (additionalAttributes != null)
      'additionalAttributes': additionalAttributes,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/graph/query',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return QueryGraphOutput.fromJson(response);
}