putManagedInsightRules method
Future<PutManagedInsightRulesOutput>
putManagedInsightRules({
- required List<
ManagedRule> managedRules,
Creates a managed Contributor Insights rule for a specified Amazon Web
Services resource. When you enable a managed rule, you create a
Contributor Insights rule that collects data from Amazon Web Services
services. You cannot edit these rules with PutInsightRule.
The rules can be enabled, disabled, and deleted using
EnableInsightRules, DisableInsightRules, and
DeleteInsightRules. If a previously created managed rule is
currently disabled, a subsequent call to this API will re-enable it. Use
ListManagedInsightRules to describe all available rules.
May throw InvalidParameterValueException.
May throw MissingRequiredParameterException.
Parameter managedRules :
A list of ManagedRules to enable.
Implementation
Future<PutManagedInsightRulesOutput> putManagedInsightRules({
required List<ManagedRule> managedRules,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'GraniteServiceVersion20100801.PutManagedInsightRules'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ManagedRules': managedRules,
},
);
return PutManagedInsightRulesOutput.fromJson(jsonResponse.body);
}