enableInsightRules method
Enables the specified Contributor Insights rules. When rules are enabled, they immediately begin analyzing log data.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw MissingRequiredParameterException.
Parameter ruleNames :
An array of the rule names to enable. If you need to find out the names of
your rules, use DescribeInsightRules.
Implementation
Future<EnableInsightRulesOutput> enableInsightRules({
required List<String> ruleNames,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'GraniteServiceVersion20100801.EnableInsightRules'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'RuleNames': ruleNames,
},
);
return EnableInsightRulesOutput.fromJson(jsonResponse.body);
}