describeDataset method

Future<DescribeDatasetResponse> describeDataset({
  1. required String datasetArn,
})

Describes the given dataset. For more information on datasets, see CreateDataset.

May throw InvalidInputException. May throw ResourceNotFoundException.

Parameter datasetArn : The Amazon Resource Name (ARN) of the dataset to describe.

Implementation

Future<DescribeDatasetResponse> describeDataset({
  required String datasetArn,
}) async {
  ArgumentError.checkNotNull(datasetArn, 'datasetArn');
  _s.validateStringLength(
    'datasetArn',
    datasetArn,
    0,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonPersonalize.DescribeDataset'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'datasetArn': datasetArn,
    },
  );

  return DescribeDatasetResponse.fromJson(jsonResponse.body);
}