getDataSource method

Future<GetDataSourceResponse> getDataSource({
  1. required String domainName,
  2. required String name,
})

Retrieves information about a direct query data source.

May throw BaseException. May throw DependencyFailureException. May throw DisabledOperationException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter domainName : The name of the domain.

Parameter name : The name of the data source to get information about.

Implementation

Future<GetDataSourceResponse> getDataSource({
  required String domainName,
  required String name,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/2021-01-01/opensearch/domain/${Uri.encodeComponent(domainName)}/dataSource/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetDataSourceResponse.fromJson(response);
}