describeFindings method

Future<DescribeFindingsResponse> describeFindings({
  1. required List<String> findingArns,
  2. Locale? locale,
})

Describes the findings that are specified by the ARNs of the findings.

May throw InternalException. May throw InvalidInputException.

Parameter findingArns : The ARN that specifies the finding that you want to describe.

Parameter locale : The locale into which you want to translate a finding description, recommendation, and the short description that identifies the finding.

Implementation

Future<DescribeFindingsResponse> describeFindings({
  required List<String> findingArns,
  Locale? locale,
}) async {
  ArgumentError.checkNotNull(findingArns, 'findingArns');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'InspectorService.DescribeFindings'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'findingArns': findingArns,
      if (locale != null) 'locale': locale.toValue(),
    },
  );

  return DescribeFindingsResponse.fromJson(jsonResponse.body);
}