describeFilter method

Future<DescribeFilterResponse> describeFilter({
  1. required String filterArn,
})

Describes a filter's properties.

May throw InvalidInputException. May throw ResourceNotFoundException.

Parameter filterArn : The ARN of the filter to describe.

Implementation

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

  return DescribeFilterResponse.fromJson(jsonResponse.body);
}