CmdID

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

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

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

2 in the AWS CLI reference
--analyzer-nameThe name of the analyzer to retrieve rules from.
--rule-nameThe name of the rule to retrieve.