Skip to content
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

add apigateway v2 #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
40 changes: 38 additions & 2 deletions res/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

# ------------------------------------------------------------------------
#
# API Gateway (simple)
# API Gateway (REST)
#
# ------------------------------------------------------------------------

def get_apigateway_inventory(oId, profile, boto3_config, selected_regions):

"""
Returns API Gateway inventory
Returns API Gateway (rest) inventory

:param oId: ownerId (AWS account)
:type oId: string
Expand All @@ -49,6 +49,42 @@ def get_apigateway_inventory(oId, profile, boto3_config, selected_regions):
)


# ------------------------------------------------------------------------
#
# API Gateway V2 (HTTP)
#
# ------------------------------------------------------------------------

def get_apigatewayv2_inventory(oId, profile, boto3_config, selected_regions):

"""
Returns API Gateway v2 (http) inventory

:param oId: ownerId (AWS account)
:type oId: string
:param profile: configuration profile name used for session
:type profile: string

:return: API Gateway inventory
:rtype: json

..note:: http://boto3.readthedocs.io/en/latest/reference/services/apigatewayv2.html
..todo:: add --> plans, api keys, custom domain names, client certificates, vpc links
"""

return glob.get_inventory(
ownerId = oId,
profile = profile,
boto3_config = boto3_config,
selected_regions = selected_regions,
aws_service = "apigatewayv2",
aws_region = "all",
function_name = "get_apis",
key_get = "Items",
pagination = True
)


# ------------------------------------------------------------------------
#
# CloudFront
Expand Down