apply_archive_rule(
analyzer_arn: AnalyzerArn,
rule_name: Name,
*,
config_overrides: Optional[AccessAnalyzerClientConfig] = None,
client_token: Optional[str] = None,
) -> None
Retroactively applies the archive rule to existing findings that meet the archive rule criteria.
Parameters:
-
analyzer_arn
(AnalyzerArn)
–
The Amazon resource name (ARN) of the analyzer.
-
rule_name
(Name)
–
The name of the rule to apply.
-
client_token
(Optional[str], default:
None
)
–
Raises:
Source code in docs_src/capo_accessanalyzer/_services/access_analyzer.py
| def apply_archive_rule(
self,
analyzer_arn: "capo_accessanalyzer.types.analyzer_arn.AnalyzerArn",
rule_name: "capo_accessanalyzer.types.name.Name",
*,
config_overrides: Optional[AccessAnalyzerClientConfig] = None,
client_token: Optional[str] = None,
) -> None:
"""<p>Retroactively applies the archive rule to existing findings that meet the archive rule criteria.</p>
Args:
analyzer_arn: <p>The Amazon resource name (ARN) of the analyzer.</p>
rule_name: <p>The name of the rule to apply.</p>
client_token: <p>A client token.</p>
Raises:
capo_accessanalyzer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_accessanalyzer.errors.internal_server_exception.InternalServerException: <p>Internal server error.</p>
capo_accessanalyzer.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found.</p>
capo_accessanalyzer.errors.throttling_exception.ThrottlingException: <p>Throttling limit exceeded error.</p>
capo_accessanalyzer.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
capo_accessanalyzer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_accessanalyzer.types.apply_archive_rule_request.ApplyArchiveRuleRequest]",
) -> OperationResponse[None]:
import capo_accessanalyzer._operations.access_analyzer.apply_archive_rule
output, http_response = (
capo_accessanalyzer._operations.access_analyzer.apply_archive_rule.apply_archive_rule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ApplyArchiveRule")
)
input_: capo_accessanalyzer.types.apply_archive_rule_request.ApplyArchiveRuleRequest = {
"analyzer_arn": analyzer_arn,
"rule_name": rule_name,
}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|