queryLineage method
Use this action to inspect your lineage and discover relationships between entities. For more information, see Querying Lineage Entities in the Amazon SageMaker Developer Guide.
May throw ResourceNotFound.
Parameter direction :
Associations between lineage entities have a direction. This parameter
determines the direction from the StartArn(s) that the query traverses.
Parameter filters :
A set of filtering parameters that allow you to specify which entities
should be returned.
- Properties - Key-value pairs to match on the lineage entities' properties.
-
LineageTypes - A set of lineage entity types to match on. For example:
TrialComponent,Artifact, orContext. - CreatedBefore - Filter entities created before this date.
- ModifiedBefore - Filter entities modified before this date.
- ModifiedAfter - Filter entities modified after this date.
Parameter includeEdges :
Setting this value to True retrieves not only the entities of
interest but also the Associations
and lineage entities on the path. Set to False to only return
lineage entities that match your query.
Parameter maxDepth :
The maximum depth in lineage relationships from the StartArns
that are traversed. Depth is a measure of the number of
Associations from the StartArn entity to the
matched results.
Parameter maxResults :
Limits the number of vertices in the results. Use the
NextToken in a response to to retrieve the next page of
results.
Parameter nextToken :
Limits the number of vertices in the request. Use the
NextToken in a response to to retrieve the next page of
results.
Parameter startArns :
A list of resource Amazon Resource Name (ARN) that represent the starting
point for your lineage query.
Implementation
Future<QueryLineageResponse> queryLineage({
Direction? direction,
QueryFilters? filters,
bool? includeEdges,
int? maxDepth,
int? maxResults,
String? nextToken,
List<String>? startArns,
}) async {
_s.validateNumRange(
'maxDepth',
maxDepth,
0,
10,
);
_s.validateNumRange(
'maxResults',
maxResults,
0,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.QueryLineage'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (direction != null) 'Direction': direction.value,
if (filters != null) 'Filters': filters,
if (includeEdges != null) 'IncludeEdges': includeEdges,
if (maxDepth != null) 'MaxDepth': maxDepth,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (startArns != null) 'StartArns': startArns,
},
);
return QueryLineageResponse.fromJson(jsonResponse.body);
}