describeExclusions method

Future<DescribeExclusionsResponse> describeExclusions({
  1. required List<String> exclusionArns,
  2. Locale? locale,
})

Describes the exclusions that are specified by the exclusions' ARNs.

May throw InternalException. May throw InvalidInputException.

Parameter exclusionArns : The list of ARNs that specify the exclusions that you want to describe.

Parameter locale : The locale into which you want to translate the exclusion's title, description, and recommendation.

Implementation

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

  return DescribeExclusionsResponse.fromJson(jsonResponse.body);
}