Add invocation info to script (#4348)
Co-authored-by: Karri Balk <kbalk@users.noreply.github.com>
This commit is contained in:
parent
c3503081bc
commit
e4c074de69
@ -1,31 +1,38 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
"""Download markdown files with AWS managed ConfigRule info and convert to JSON.
|
"""Download markdown files with AWS managed ConfigRule info and convert to JSON.
|
||||||
|
|
||||||
The first markdown file is read to obtain the names of markdown files for
|
Invocation: pull_down_aws_managed_rules.py
|
||||||
all the AWS managed config rules. Then each of those markdown files are read
|
There are no command line options. MANAGED_RULES_OUTPUT_FILENAME
|
||||||
and info is extracted with the final results written to a JSON file.
|
is the variable containing the name of the output file that will be
|
||||||
|
overwritten when this script is run.
|
||||||
|
|
||||||
The JSON output will look as follows:
|
Summary:
|
||||||
|
The first markdown file is read to obtain the names of markdown files
|
||||||
|
for all the AWS managed config rules. Then each of those markdown files
|
||||||
|
are read and info is extracted with the final results written to a JSON
|
||||||
|
file.
|
||||||
|
|
||||||
{
|
The JSON output will look as follows:
|
||||||
"ManagedRules": [
|
|
||||||
{
|
{
|
||||||
"ACCESS_KEYS_ROTATED": {
|
"ManagedRules": [
|
||||||
"AWS Region": "All supported AWS regions",
|
{
|
||||||
"Parameters": [
|
"ACCESS_KEYS_ROTATED": {
|
||||||
{
|
"AWS Region": "All supported AWS regions",
|
||||||
"Default": "90",
|
"Parameters": [
|
||||||
"Name": "maxAccessKeyAgeType",
|
{
|
||||||
"Optional": false,
|
"Default": "90",
|
||||||
"Type": "intDefault"
|
"Name": "maxAccessKeyAgeType",
|
||||||
}
|
"Optional": false,
|
||||||
],
|
"Type": "intDefault"
|
||||||
"Trigger type": "Periodic"
|
}
|
||||||
|
],
|
||||||
|
"Trigger type": "Periodic"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
...
|
||||||
...
|
]
|
||||||
]
|
}
|
||||||
}
|
|
||||||
"""
|
"""
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
Loading…
Reference in New Issue
Block a user