listDataSources method

Future<ListDataSourcesOutput> listDataSources({
  1. required String domainIdentifier,
  2. required String projectIdentifier,
  3. String? connectionIdentifier,
  4. String? environmentIdentifier,
  5. int? maxResults,
  6. String? name,
  7. String? nextToken,
  8. DataSourceStatus? status,
  9. String? type,
})

Lists data sources in Amazon DataZone.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter domainIdentifier : The identifier of the Amazon DataZone domain in which to list the data sources.

Parameter projectIdentifier : The identifier of the project in which to list data sources.

Parameter connectionIdentifier : The ID of the connection.

Parameter environmentIdentifier : The identifier of the environment in which to list the data sources.

Parameter maxResults : The maximum number of data sources to return in a single call to ListDataSources. When the number of data sources 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 ListDataSources to list the next set of data sources.

Parameter name : The name of the data source.

Parameter nextToken : When the number of data sources 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 data sources, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListDataSources to list the next set of data sources.

Parameter status : The status of the data source.

Parameter type : The type of the data source.

Implementation

Future<ListDataSourcesOutput> listDataSources({
  required String domainIdentifier,
  required String projectIdentifier,
  String? connectionIdentifier,
  String? environmentIdentifier,
  int? maxResults,
  String? name,
  String? nextToken,
  DataSourceStatus? status,
  String? type,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    'projectIdentifier': [projectIdentifier],
    if (connectionIdentifier != null)
      'connectionIdentifier': [connectionIdentifier],
    if (environmentIdentifier != null)
      'environmentIdentifier': [environmentIdentifier],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (name != null) 'name': [name],
    if (nextToken != null) 'nextToken': [nextToken],
    if (status != null) 'status': [status.value],
    if (type != null) 'type': [type],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/data-sources',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDataSourcesOutput.fromJson(response);
}