Retrieves information about an archive rule.
To learn about filter keys that you can use to create an archive rule, see IAM Access Analyzer filter keys in the IAM User Guide.
Parameters:
-
analyzer_name
(AnalyzerName)
–
The name of the analyzer to retrieve rules from.
-
rule_name
(Name)
–
The name of the rule to retrieve.
Raises:
Source code in docs_src/capo_accessanalyzer/_services/access_analyzer.py
| def get_archive_rule(
self,
analyzer_name: "capo_accessanalyzer.types.analyzer_name.AnalyzerName",
rule_name: "capo_accessanalyzer.types.name.Name",
*,
config_overrides: Optional[AccessAnalyzerClientConfig] = None,
) -> "capo_accessanalyzer.types.get_archive_rule_response.GetArchiveRuleResponse":
"""<p>Retrieves information about an archive rule.</p> <p>To learn about filter keys that you can use to create an archive rule, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html">IAM Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>
Args:
analyzer_name: <p>The name of the analyzer to retrieve rules from.</p>
rule_name: <p>The name of the rule to retrieve.</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.get_archive_rule_request.GetArchiveRuleRequest]",
) -> OperationResponse[
"capo_accessanalyzer.types.get_archive_rule_response.GetArchiveRuleResponse"
]:
import capo_accessanalyzer._operations.access_analyzer.get_archive_rule
output, http_response = (
capo_accessanalyzer._operations.access_analyzer.get_archive_rule.get_archive_rule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetArchiveRule")
)
input_: capo_accessanalyzer.types.get_archive_rule_request.GetArchiveRuleRequest = {
"analyzer_name": analyzer_name,
"rule_name": rule_name,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|