2016-03-01 12:03:59 -05:00
|
|
|
from .responses import APIGatewayResponse
|
2022-02-08 20:12:51 -01:00
|
|
|
from ..apigatewayv2.urls import url_paths as url_paths_v2
|
2016-03-01 12:03:59 -05:00
|
|
|
|
2021-02-15 10:31:33 +00:00
|
|
|
response = APIGatewayResponse()
|
|
|
|
|
2021-10-08 10:03:05 +00:00
|
|
|
url_bases = [r"https?://apigateway\.(.+)\.amazonaws.com"]
|
2016-03-01 12:03:59 -05:00
|
|
|
|
|
|
|
url_paths = {
|
2021-02-15 10:31:33 +00:00
|
|
|
"{0}/restapis$": response.restapis,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/?$": response.restapis_individual,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/resources$": response.resources,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/authorizers$": response.restapis_authorizers,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/authorizers/(?P<authorizer_id>[^/]+)/?$": response.authorizers,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/stages$": response.restapis_stages,
|
2021-09-04 23:35:39 +05:30
|
|
|
"{0}/tags/arn:aws:apigateway:(?P<region_name>[^/]+)::/restapis/(?P<function_id>[^/]+)/stages/(?P<stage_name>[^/]+)/?$": response.restapis_stages_tags,
|
2021-02-15 10:31:33 +00:00
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/stages/(?P<stage_name>[^/]+)/?$": response.stages,
|
2023-01-14 15:00:07 -01:00
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/stages/(?P<stage_name>[^/]+)/exports/(?P<export_type>[^/]+)/?$": response.export,
|
2021-02-15 10:31:33 +00:00
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/deployments$": response.deployments,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/deployments/(?P<deployment_id>[^/]+)/?$": response.individual_deployment,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/?$": response.resource_individual,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/?$": response.resource_methods,
|
|
|
|
r"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/responses/(?P<status_code>\d+)$": response.resource_method_responses,
|
2022-10-17 19:06:59 +00:00
|
|
|
r"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/integration$": response.integrations,
|
|
|
|
r"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/integration/responses/(?P<status_code>\d+)$": response.integration_responses,
|
|
|
|
r"{0}/restapis/(?P<function_id>[^/]+)/resources/(?P<resource_id>[^/]+)/methods/(?P<method_name>[^/]+)/integration/responses/(?P<status_code>\d+)/$": response.integration_responses,
|
2021-02-15 10:31:33 +00:00
|
|
|
"{0}/apikeys$": response.apikeys,
|
|
|
|
"{0}/apikeys/(?P<apikey>[^/]+)": response.apikey_individual,
|
|
|
|
"{0}/usageplans$": response.usage_plans,
|
|
|
|
"{0}/domainnames$": response.domain_names,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/models$": response.models,
|
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/models/(?P<model_name>[^/]+)/?$": response.model_induvidual,
|
|
|
|
"{0}/domainnames/(?P<domain_name>[^/]+)/?$": response.domain_name_induvidual,
|
2021-10-27 19:48:32 +09:00
|
|
|
"{0}/domainnames/(?P<domain_name>[^/]+)/basepathmappings$": response.base_path_mappings,
|
2021-11-06 19:52:27 +09:00
|
|
|
"{0}/domainnames/(?P<domain_name>[^/]+)/basepathmappings/(?P<base_path_mapping>[^/]+)$": response.base_path_mapping_individual,
|
2021-02-15 10:31:33 +00:00
|
|
|
"{0}/usageplans/(?P<usage_plan_id>[^/]+)/?$": response.usage_plan_individual,
|
|
|
|
"{0}/usageplans/(?P<usage_plan_id>[^/]+)/keys$": response.usage_plan_keys,
|
|
|
|
"{0}/usageplans/(?P<usage_plan_id>[^/]+)/keys/(?P<api_key_id>[^/]+)/?$": response.usage_plan_key_individual,
|
2021-09-22 09:34:20 -07:00
|
|
|
"{0}/restapis/(?P<function_id>[^/]+)/requestvalidators$": response.request_validators,
|
|
|
|
"{0}/restapis/(?P<api_id>[^/]+)/requestvalidators/(?P<validator_id>[^/]+)/?$": response.request_validator_individual,
|
2022-02-18 22:31:33 -01:00
|
|
|
"{0}/restapis/(?P<api_id>[^/]+)/gatewayresponses/?$": response.gateway_responses,
|
|
|
|
"{0}/restapis/(?P<api_id>[^/]+)/gatewayresponses/(?P<response_type>[^/]+)/?$": response.gateway_response,
|
2022-02-08 20:12:51 -01:00
|
|
|
"{0}/vpclinks$": response.vpc_links,
|
|
|
|
"{0}/vpclinks/(?P<vpclink_id>[^/]+)": response.vpc_link,
|
2016-03-01 12:03:59 -05:00
|
|
|
}
|
2022-02-08 20:12:51 -01:00
|
|
|
|
|
|
|
# Also manages the APIGatewayV2
|
|
|
|
url_paths.update(url_paths_v2)
|