Skip to content

Made data scraping changes; fixes to unit tests. Fixes #256 #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ toml==0.10.0
tornado==6.0.4
tqdm==4.46.0
typed-ast==1.4.1
urllib3==1.26.2
urllib3==1.25.10
virtualenv==20.0.17
virtualenv-clone==0.5.4
wcwidth==0.1.9
Expand Down
6 changes: 2 additions & 4 deletions policy_sentry/shared/awsdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def update_html_docs_directory(html_docs_destination):
(2) the config directory
:return:
"""
link_url_prefix = "https://docs.aws.amazon.com/IAM/latest/UserGuide/"
link_url_prefix = "https://docs.aws.amazon.com/service-authorization/latest/reference/"
initial_html_filenames_list = (
get_links_from_base_actions_resources_conditions_page()
)
Expand Down Expand Up @@ -157,7 +157,7 @@ def create_database(destination_directory, access_level_overrides_file):
"""

# Create the docs directory if it doesn't exist
Path(os.path.join(destination_directory, "data", "docs")).mkdir(
Path(os.path.join(destination_directory, "docs")).mkdir(
parents=True, exist_ok=True
)

Expand Down Expand Up @@ -398,9 +398,7 @@ def create_database(destination_directory, access_level_overrides_file):
service_prefix: service_schema
}
schema.update(this_service_schema)
# schema.append(service_schema)

# schema.sort(key=lambda x: x["prefix"])
iam_definition_file = os.path.join(destination_directory, "iam-definition.json")
with open(iam_definition_file, "w") as file:
json.dump(schema, file, indent=4)
Expand Down
81 changes: 27 additions & 54 deletions policy_sentry/shared/data/docs/list_alexaforbusiness.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<title>
Actions, resources, and condition keys for Alexa for Business - AWS Identity and Access Management
Actions, resources, and condition keys for Alexa for Business - Service Authorization Reference
</title>
<meta content="width=device-width,initial-scale=1" name="viewport"/>
<meta content="/assets" name="assets_root"/>
<meta content="list_alexaforbusiness" name="target_state"/>
<meta content="list_alexaforbusiness" name="default_state"/>
<link href="https://docs.aws.amazon.com/assets/images/favicon.ico" rel="icon" type="image/ico"/>
<link href="https://docs.aws.amazon.com/assets/images/favicon.ico" rel="shortcut icon" type="image/ico"/>
<link href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_alexaforbusiness.html" rel="canonical"/>
<link href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_alexaforbusiness.html" rel="canonical"/>
<meta content="Lists all of the available service-specific resources, actions, and condition keys that can be used in IAM policies to control access to Alexa for Business." name="description"/>
<meta content="IAD" name="deployment_region"/>
<meta content="AWS Identity and Access Management" name="product"/>
<meta content="User Guide" name="guide"/>
<meta content="Service Authorization Reference" name="product"/>
<meta content="Service Authorization Reference" name="guide"/>
<meta content="de_de:Deutsch/en_us:English/es_es:Español/fr_fr:Français/it_it:Italiano/ja_jp:日本語/ko_kr:한국어/pt_br:Português/zh_cn:中文 (简体)/zh_tw:中文 (繁體)" name="locales"/>
<meta content="Control access to your AWS resources with user identity (authentication) and with policies that define specific permissions (authorization)." name="abstract"/>
<meta content="Provides a list of the actions, resources, and condition keys supported by each AWS service that can be used in an IAM policy." name="abstract"/>
<meta content="en_us" name="guide-locale"/>
<meta content="toc-contents.json" name="tocs"/>
<meta content="IAM" name="feedback-item"/>
<meta content="AWS Identity and Access Management" name="this_doc_product"/>
<meta content="User Guide" name="this_doc_guide"/>
<meta content="28a2649e-f83d-40ca-9be6-ab79185dc90a" name="feedback-folder"/>
<meta content="Service Authorization Reference" name="this_doc_product"/>
<meta content="Service Authorization Reference" name="this_doc_guide"/>
<link href="https://docs.aws.amazon.com/assets/css/vendor4.css?version=2020.09.30" rel="stylesheet"/>
<link href="https://docs.aws.amazon.com/assets/css/awsdocs-common.css?version=2020.09.30" rel="stylesheet"/>
<script defer="" src="https://docs.aws.amazon.com/assets/js/vendor3.js?version=2020.09.30" type="text/javascript">
Expand Down Expand Up @@ -50,26 +50,18 @@
<div id="awsdocs-content">
<head>
<title>
Actions, resources, and condition keys for Alexa for Business - AWS Identity and Access Management
Actions, resources, and condition keys for Alexa for Business - Service Authorization Reference
</title>
<meta content="iam-ug.pdf#list_alexaforbusiness" name="pdf"/>
<meta content="https://www.amazon.com/dp/B07642VLTV" name="kindle"/>
<meta content="https://github.com/awsdocs/iam-user-guide/tree/master/doc_source/list_alexaforbusiness.md" name="github"/>
<meta content="aws-iam-release-notes.rss" name="rss"/>
<meta content="service-authorization.pdf#list_alexaforbusiness" name="pdf"/>
<meta content="http://forums.aws.amazon.com/forum.jspa?forumID=76" name="forums"/>
<meta content="https://docs.aws.amazon.com/forms/aws-doc-feedback?hidden_service_name=IAM&amp;topic_url=http://docs.aws.amazon.com/en_us/IAM/latest/UserGuide/list_alexaforbusiness.html" name="feedback"/>
<meta content="feedbackyes.html?topic_url=http://docs.aws.amazon.com/en_us/IAM/latest/UserGuide/list_alexaforbusiness.html" name="feedback-yes"/>
<meta content="feedbackno.html?topic_url=http://docs.aws.amazon.com/en_us/IAM/latest/UserGuide/list_alexaforbusiness.html" name="feedback-no"/>
<meta content="IAM,AWS Identity and Access Management,IAM user,user,IAM group,group,IAM role,role,permission policy,trust policy,policy,access key,password" name="keywords"/>
<meta content="https://docs.aws.amazon.com/forms/aws-doc-feedback?feedback_destination_id=28a2649e-f83d-40ca-9be6-ab79185dc90a&amp;topic_url=http://docs.aws.amazon.com/en_us/service-authorization/latest/reference/list_alexaforbusiness.html" name="feedback"/>
<meta content="feedbackyes.html?topic_url=http://docs.aws.amazon.com/en_us/service-authorization/latest/reference/list_alexaforbusiness.html" name="feedback-yes"/>
<meta content="feedbackno.html?topic_url=http://docs.aws.amazon.com/en_us/service-authorization/latest/reference/list_alexaforbusiness.html" name="feedback-no"/>
</head>
<body>
<div id="main">
<div style="display: none">
<a href="iam-ug.pdf#list_alexaforbusiness" target="_blank" title="Open PDF">
</a>
<a href="https://www.amazon.com/dp/B07642VLTV" target="_blank" title="Open Kindle">
</a>
<a href="https://github.com/awsdocs/iam-user-guide/tree/master/doc_source/list_alexaforbusiness.md" target="_blank" title="Edit on GitHub">
<a href="service-authorization.pdf#list_alexaforbusiness" target="_blank" title="Open PDF">
</a>
</div>
<div class="breadcrumb" id="breadcrumbs">
Expand All @@ -80,10 +72,10 @@
Documentation
</a>
<a href="/iam/index.html">
AWS Identity and Access Management
Service Authorization Reference
</a>
<a href="introduction.html">
User Guide
<a href="reference.html">
Service Authorization Reference
</a>
</div>
<div id="page-toc-src">
Expand All @@ -110,25 +102,6 @@ <h1 class="topictitle" id="list_alexaforbusiness">
<awsdocs-filter-selector id="awsdocs-filter-selector">
</awsdocs-filter-selector>
</div>
<div class="awsdocs-note awsdocs-tip">
<div class="awsdocs-note-title">
<awsui-icon name="status-info" variant="link">
</awsui-icon>
<span>
Tip
</span>
</div>
<div class="awsdocs-note-text">
<p>
This page is moving to a new location on November 16, 2020. Please update your bookmark
to use the new page at
<a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_alexaforbusiness.html">
https://docs.aws.amazon.com/service-authorization/latest/reference/list_alexaforbusiness.html
</a>
.
</p>
</div>
</div>
<p>
Alexa for Business (service prefix:
<code class="code">
Expand Down Expand Up @@ -217,7 +190,7 @@ <h2 id="alexaforbusiness-actions-as-permissions">
</p>
<div class="table-container">
<div class="table-contents">
<table id="w469aac33c14c29c25c13b9">
<table id="w87aab5b9c27c11b9">
<thead>
<tr>
<th>
Expand Down Expand Up @@ -2352,7 +2325,7 @@ <h2 id="alexaforbusiness-resources-for-iam-policies">
</p>
<div class="table-container">
<div class="table-contents">
<table id="w469aac33c14c29c25c15b5">
<table id="w87aab5b9c27c13b5">
<thead>
<tr>
<th>
Expand Down Expand Up @@ -2722,14 +2695,14 @@ <h2 id="alexaforbusiness-policy-keys">
</p>
<p>
To view the global condition keys that are available to all services, see
<a href="reference_policies_condition-keys.html#AvailableKeys" target="_blank">
<a href="reference_policies_condition-keys.html#AvailableKeys" rel="noopener noreferrer" target="_blank">
Available global condition keys
</a>
.
</p>
<div class="table-container">
<div class="table-contents">
<table id="w469aac33c14c29c25c17b7">
<table id="w87aab5b9c27c15b7">
<thead>
<tr>
<th>
Expand Down Expand Up @@ -2854,8 +2827,8 @@ <h2 id="alexaforbusiness-policy-keys">
</a>
</div>
<div class="prev-next">
<div accesskey="p" class="prev-link" href="./list_awsaccounts.html" id="previous">
AWS Accounts
<div accesskey="p" class="prev-link" href="./list_awsactivate.html" id="previous">
AWS Activate
</div>
<div accesskey="n" class="next-link" href="./list_awsamplify.html" id="next">
AWS Amplify
Expand All @@ -2879,7 +2852,7 @@ <h2 id="alexaforbusiness-policy-keys">
so we can do more of it.
</p>
<p>
<awsui-button click="linkClick($event)" href="https://docs.aws.amazon.com/forms/aws-doc-feedback?hidden_service_name=IAM&amp;topic_url=https://docs.aws.amazon.com/en_us/IAM/latest/UserGuide/list_alexaforbusiness.html" id="fblink" target="_blank" text="Feedback">
<awsui-button click="linkClick($event)" href="https://docs.aws.amazon.com/forms/aws-doc-feedback?feedback_destination_id=28a2649e-f83d-40ca-9be6-ab79185dc90a&amp;topic_url=https://docs.aws.amazon.com/en_us/service-authorization/latest/reference/list_alexaforbusiness.html" id="fblink" target="_blank" text="Feedback">
</awsui-button>
</p>
</div>
Expand All @@ -2898,7 +2871,7 @@ <h2 id="alexaforbusiness-policy-keys">
the documentation better.
</p>
<p>
<awsui-button click="linkClick($event)" href="https://docs.aws.amazon.com/forms/aws-doc-feedback?hidden_service_name=IAM&amp;topic_url=https://docs.aws.amazon.com/en_us/IAM/latest/UserGuide/list_alexaforbusiness.html" id="fblink" target="_blank" text="Feedback">
<awsui-button click="linkClick($event)" href="https://docs.aws.amazon.com/forms/aws-doc-feedback?feedback_destination_id=28a2649e-f83d-40ca-9be6-ab79185dc90a&amp;topic_url=https://docs.aws.amazon.com/en_us/service-authorization/latest/reference/list_alexaforbusiness.html" id="fblink" target="_blank" text="Feedback">
</awsui-button>
</p>
</div>
Expand Down Expand Up @@ -2926,8 +2899,8 @@ <h2 id="alexaforbusiness-policy-keys">
-->
<script language="JavaScript" type="text/javascript">
var awsdocs = awsdocs || {};
awsdocs.prop66 = 'AWS Identity and Access Management';
awsdocs.prop65 = 'User Guide';
awsdocs.prop66 = 'Service Authorization Reference';
awsdocs.prop65 = 'Service Authorization Reference';
</script>
<script language="JavaScript" src="https://a0.awsstatic.com/s_code/js/3.0/awshome_s_code.js" type="text/javascript">
</script>
Expand Down
Loading