getDataProduct method
Gets the data product.
Prerequisites:
- The data product ID must exist.
- The domain must be valid and accessible.
- User must have read or discovery permissions for the data product.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainIdentifier :
The ID of the domain where the data product lives.
Parameter identifier :
The ID of the data product.
Parameter revision :
The revision of the data product.
Implementation
Future<GetDataProductOutput> getDataProduct({
required String domainIdentifier,
required String identifier,
String? revision,
}) async {
final $query = <String, List<String>>{
if (revision != null) 'revision': [revision],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/data-products/${Uri.encodeComponent(identifier)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetDataProductOutput.fromJson(response);
}