listDatasetDataSegmentRelationships method

Future<ListDatasetDataSegmentRelationshipsResponse> listDatasetDataSegmentRelationships({
  1. required String datasetId,
  2. required String workspaceName,
  3. int? maxResults,
  4. String? nextToken,
})

Retrieves a paginated list of data segment relationships for a session dataset. Use this operation to find the curated datasets that reference data segments of the specified session dataset. Use the nextToken parameter to retrieve additional results.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter datasetId : The ID of the session dataset to list data segment relationships for.

Parameter workspaceName : The name of the workspace that contains the dataset.

Parameter maxResults : The maximum number of results to return for each paginated request. Default: 50.

Parameter nextToken : The token to be used for the next set of paginated results.

Implementation

Future<ListDatasetDataSegmentRelationshipsResponse>
    listDatasetDataSegmentRelationships({
  required String datasetId,
  required String workspaceName,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    'workspaceName': [workspaceName],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/datasets/${Uri.encodeComponent(datasetId)}/data-segment-relationships',
    queryParams: $query,
    hostPrefix: 'api.',
    exceptionFnMap: _exceptionFns,
  );
  return ListDatasetDataSegmentRelationshipsResponse.fromJson(response);
}