describeRulesPackages method
Describes the rules packages that are specified by the ARNs of the rules packages.
May throw InternalException. May throw InvalidInputException.
Parameter rulesPackageArns
:
The ARN that specifies the rules package that you want to describe.
Parameter locale
:
The locale that you want to translate a rules package description into.
Implementation
Future<DescribeRulesPackagesResponse> describeRulesPackages({
required List<String> rulesPackageArns,
Locale? locale,
}) async {
ArgumentError.checkNotNull(rulesPackageArns, 'rulesPackageArns');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'InspectorService.DescribeRulesPackages'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'rulesPackageArns': rulesPackageArns,
if (locale != null) 'locale': locale.toValue(),
},
);
return DescribeRulesPackagesResponse.fromJson(jsonResponse.body);
}