applyArchiveRule method

Future<void> applyArchiveRule({
  1. required String analyzerArn,
  2. required String ruleName,
  3. String? clientToken,
})

Retroactively applies the archive rule to existing findings that meet the archive rule criteria.

May throw ResourceNotFoundException. May throw ValidationException. May throw InternalServerException. May throw ThrottlingException. May throw AccessDeniedException.

Parameter analyzerArn : The Amazon resource name (ARN) of the analyzer.

Parameter ruleName : The name of the rule to apply.

Parameter clientToken : A client token.

Implementation

Future<void> applyArchiveRule({
  required String analyzerArn,
  required String ruleName,
  String? clientToken,
}) async {
  ArgumentError.checkNotNull(analyzerArn, 'analyzerArn');
  ArgumentError.checkNotNull(ruleName, 'ruleName');
  _s.validateStringLength(
    'ruleName',
    ruleName,
    1,
    255,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'analyzerArn': analyzerArn,
    'ruleName': ruleName,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/archive-rule',
    exceptionFnMap: _exceptionFns,
  );
}