describeAlgorithm method

Future<DescribeAlgorithmResponse> describeAlgorithm({
  1. required String algorithmArn,
})

Describes the given algorithm.

May throw InvalidInputException. May throw ResourceNotFoundException.

Parameter algorithmArn : The Amazon Resource Name (ARN) of the algorithm to describe.

Implementation

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

  return DescribeAlgorithmResponse.fromJson(jsonResponse.body);
}