updateArchiveRule method
Updates the criteria and values for the specified archive rule.
May throw ResourceNotFoundException. May throw ValidationException. May throw InternalServerException. May throw ThrottlingException. May throw AccessDeniedException.
Parameter analyzerName
:
The name of the analyzer to update the archive rules for.
Parameter filter
:
A filter to match for the rules to update. Only rules that match the
filter are updated.
Parameter ruleName
:
The name of the rule to update.
Parameter clientToken
:
A client token.
Implementation
Future<void> updateArchiveRule({
required String analyzerName,
required Map<String, Criterion> filter,
required String ruleName,
String? clientToken,
}) async {
ArgumentError.checkNotNull(analyzerName, 'analyzerName');
_s.validateStringLength(
'analyzerName',
analyzerName,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(filter, 'filter');
ArgumentError.checkNotNull(ruleName, 'ruleName');
_s.validateStringLength(
'ruleName',
ruleName,
1,
255,
isRequired: true,
);
final $payload = <String, dynamic>{
'filter': filter,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/analyzer/${Uri.encodeComponent(analyzerName)}/archive-rule/${Uri.encodeComponent(ruleName)}',
exceptionFnMap: _exceptionFns,
);
}