CmdID / aws / aws accessanalyzer
aws accessanalyzer create-archive-rule
Creates an archive rule for the specified analyzer. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To create an archive rule for the specified analyzer
The following create-archive-rule example creates an archive rule for the specified analyzer in your AWS account.
aws accessanalyzer create-archive-rule --analyzer-name UnusedAccess-ConsoleAnalyzer-organization --rule-name MyRule --filter '{"resource": {"contains": ["Cognito"]}, "resourceType": {"eq": ["AWS::IAM::Role"]}}'Identify--analyzer-nameThe name of the created analyzer.--rule-nameThe name of the rule to create.--filterThe criteria for the rule.This command produces no output.
For more information, see Archive rules in the AWS IAM User Guide.
Options
--analyzer-nameThe name of the created analyzer.--client-tokenA client token.--filterThe criteria for the rule.--rule-nameThe name of the rule to create.