getArchiveRule method

Future<GetArchiveRuleResponse> getArchiveRule({
  1. required String analyzerName,
  2. required String ruleName,
})

Retrieves information about an archive rule.

To learn about filter keys that you can use to create an archive rule, see Access Analyzer filter keys in the IAM User Guide.

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

Parameter analyzerName : The name of the analyzer to retrieve rules from.

Parameter ruleName : The name of the rule to retrieve.

Implementation

Future<GetArchiveRuleResponse> getArchiveRule({
  required String analyzerName,
  required String ruleName,
}) async {
  ArgumentError.checkNotNull(analyzerName, 'analyzerName');
  _s.validateStringLength(
    'analyzerName',
    analyzerName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(ruleName, 'ruleName');
  _s.validateStringLength(
    'ruleName',
    ruleName,
    1,
    255,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/analyzer/${Uri.encodeComponent(analyzerName)}/archive-rule/${Uri.encodeComponent(ruleName)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetArchiveRuleResponse.fromJson(response);
}