CmdID / aws / aws accessanalyzer
aws accessanalyzer get-archive-rule
Retrieves information about an archive rule. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To retrieve information about an archive rule
The following get-archive-rule example retrieves information about an archive rule in your AWS account.
aws accessanalyzer get-archive-rule --analyzer-name UnusedAccess-ConsoleAnalyzer-organization --rule-name MyArchiveRuleIdentify--analyzer-nameThe name of the analyzer to retrieve rules from.--rule-nameThe name of the rule to retrieve.Its output
{
"archiveRule": {
"createdAt": "2024-02-15T00:49:27+00:00",
"filter": {
"resource": {
"contains": [
"Cognito"
]
},
"resourceType": {
"eq": [
"AWS::IAM::Role"
]
}
},
"ruleName": "MyArchiveRule",
"updatedAt": "2024-02-15T00:49:27+00:00"
}
}For more information, see Archive rules in the AWS IAM User Guide.
Options
--analyzer-nameThe name of the analyzer to retrieve rules from.--rule-nameThe name of the rule to retrieve.